Sent when the user makes a selection from a menu.
#define WM_MENUCOMMAND 0x0126
The zero-based index of the item selected.
A handle to the menu for the item selected.
The WM_MENUCOMMAND message gives you a handle to the menu so you can access the menu data in the MENUINFO structure and also gives you the index of the selected item, which is typically what applications need. In contrast, the WM_COMMAND message gives you the menu item identifier.
The WM_MENUCOMMAND message is sent only for menus that are defined with the MNS_NOTIFYBYPOS flag set in the dwStyle member of the MENUINFO structure.
|Minimum supported client
||Windows 2000 Professional [desktop apps only]
|Minimum supported server
||Windows 2000 Server [desktop apps only]