WM_MENUSELECT message
Sent to a menu's owner window when the user selects a menu item.
#define WM_MENUSELECT 0x011F
Parameters
- wParam
-
The low-order word specifies the menu item or submenu index. If the selected item is a command item, this parameter contains the identifier of the menu item. If the selected item opens a drop-down menu or submenu, this parameter contains the index of the drop-down menu or submenu in the main menu, and the lParam parameter contains the handle to the main (clicked) menu; use the GetSubMenu function to get the menu handle to the drop-down menu or submenu.
The high-order word specifies one or more menu flags. This parameter can be one or more of the following values.
- lParam
-
A handle to the menu that was clicked.
Return value
If an application processes this message, it should return zero.
Remarks
If the high-order word of wParam contains 0xFFFF and the lParam parameter contains NULL, the system has closed the menu.
Do not use the value –1 for the high-order word of wParam, because this value is specified as (UINT) HIWORD(wParam). If the value is 0xFFFF, it would be interpreted as 0x0000FFFF, not –1, because of the cast to a UINT.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
See also
- Reference
- GetSubMenu
- HIWORD
- LOWORD
- Conceptual
- Keyboard Accelerators