|
1 | 1 | ---
|
2 | 2 | title: "CMFCMenuButton Class"
|
3 |
| -ms.date: "11/04/2016" |
4 |
| -f1_keywords: ["CMFCMenuButton", "AFXMENUBUTTON/CMFCMenuButton", "AFXMENUBUTTON/CMFCMenuButton::CMFCMenuButton", "AFXMENUBUTTON/CMFCMenuButton::PreTranslateMessage", "AFXMENUBUTTON/CMFCMenuButton::SizeToContent", "AFXMENUBUTTON/CMFCMenuButton::m_bOSMenu", "AFXMENUBUTTON/CMFCMenuButton::m_bRightArrow", "AFXMENUBUTTON/CMFCMenuButton::m_bStayPressed", "AFXMENUBUTTON/CMFCMenuButton::m_hMenu", "AFXMENUBUTTON/CMFCMenuButton::m_nMenuResult"] |
5 |
| -helpviewer_keywords: ["CMFCMenuButton [MFC], CMFCMenuButton", "CMFCMenuButton [MFC], PreTranslateMessage", "CMFCMenuButton [MFC], SizeToContent", "CMFCMenuButton [MFC], m_bOSMenu", "CMFCMenuButton [MFC], m_bRightArrow", "CMFCMenuButton [MFC], m_bStayPressed", "CMFCMenuButton [MFC], m_hMenu", "CMFCMenuButton [MFC], m_nMenuResult"] |
| 3 | +ms.date: "07/15/2019" |
| 4 | +f1_keywords: ["CMFCMenuButton", "AFXMENUBUTTON/CMFCMenuButton", "AFXMENUBUTTON/CMFCMenuButton::CMFCMenuButton", "AFXMENUBUTTON/CMFCMenuButton::PreTranslateMessage", "AFXMENUBUTTON/CMFCMenuButton::SizeToContent", "AFXMENUBUTTON/CMFCMenuButton::m_bOSMenu", "AFXMENUBUTTON/CMFCMenuButton::m_bRightArrow", "AFXMENUBUTTON/CMFCMenuButton::m_bStayPressed", "AFXMENUBUTTON/CMFCMenuButton::m_hMenu", "AFXMENUBUTTON/CMFCMenuButton::m_nMenuResult", "AFXMENUBUTTON/CMFCMenuButton::m_bDefaultClick"] |
| 5 | +helpviewer_keywords: ["CMFCMenuButton [MFC], CMFCMenuButton", "CMFCMenuButton [MFC], PreTranslateMessage", "CMFCMenuButton [MFC], SizeToContent", "CMFCMenuButton [MFC], m_bOSMenu", "CMFCMenuButton [MFC], m_bRightArrow", "CMFCMenuButton [MFC], m_bStayPressed", "CMFCMenuButton [MFC], m_hMenu", "CMFCMenuButton [MFC], m_nMenuResult", "CMFCMenuButton [MFC], m_bDefaultClick"] |
6 | 6 | ms.assetid: 53d3d459-1e5a-47c5-8b7f-2e61f6af5187
|
7 | 7 | ---
|
8 | 8 | # CMFCMenuButton Class
|
@@ -39,6 +39,7 @@ class CMFCMenuButton : public CMFCButton
|
39 | 39 | |[CMFCMenuButton::m_bStayPressed](#m_bstaypressed)|Specifies whether the menu button changes its state after the user releases the button.|
|
40 | 40 | |[CMFCMenuButton::m_hMenu](#m_hmenu)|A handle to the attached Windows menu.|
|
41 | 41 | |[CMFCMenuButton::m_nMenuResult](#m_nmenuresult)|An identifier that indicates which item the user selected from the pop-up menu.|
|
| 42 | +|[CMFCMenuButton::m_bDefaultClick](#m_bdefaultclick)| Allow default (on button text/image) processing.| |
42 | 43 |
|
43 | 44 | ## Remarks
|
44 | 45 |
|
@@ -141,6 +142,28 @@ int m_nMenuResult;
|
141 | 142 |
|
142 | 143 | The value of this member variable is zero if the user cancels the menu without making a selection or if an error occurs.
|
143 | 144 |
|
| 145 | +## <a name="m_bdefaultclick"></a> CMFCMenuButton::m_bDefaultClick |
| 146 | + |
| 147 | +Allows default processing of text or images on the button. |
| 148 | + |
| 149 | +``` |
| 150 | +BOOL m_bDefaultClick; |
| 151 | +``` |
| 152 | + |
| 153 | +### Remarks |
| 154 | + |
| 155 | +Setting m_bDefaultClick to false causes the button to show the menu when you click anywhere on the button. |
| 156 | + |
| 157 | +## <a name="m_nmenuresult"></a> CMFCMenuButton::m_nMenuResult |
| 158 | + |
| 159 | +An integer that indicates which item the user selects from the pop-up menu. |
| 160 | + |
| 161 | +``` |
| 162 | +int m_nMenuResult; |
| 163 | +``` |
| 164 | + |
| 165 | +### Remarks |
| 166 | + |
144 | 167 | ## <a name="pretranslatemessage"></a> CMFCMenuButton::PreTranslateMessage
|
145 | 168 |
|
146 | 169 | Called by the framework to translate window messages before they are dispatched.
|
|
0 commit comments