Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

WM_MENUCOMMAND message

Sent when the user makes a selection from a menu.


#define WM_MENUCOMMAND                  0x0126

Parameters

wParam

The zero-based index of the item selected.

lParam

A handle to the menu for the item selected.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Menus Overview

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.