WM_INITMENU

WM_INITMENU

hmenuInit = (HMENU) wParam; /* handle of menu to initialize */

The WM_INITMENU message is sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or presses a menu key. This allows the application to modify the menu before it is displayed.

Parameters

hmenuInit

Value of wParam. Identifies the menu to be initialized.

Return Value

An application should return zero if it processes this message.

Comments

A WM_INITMENU message is sent only when a menu is first accessed; only one WM_INITMENU message is generated for each access. This means, for example, that moving the mouse across several menu items while holding down the button does not generate new messages. WM_INITMENU does not provide information about menu items.

See Also

WM_INITMENUPOPUP