WM_INITMENU

This message is a request to initialize a menu. It occurs when a user moves the mouse into a menu bar and clicks, or presses a menu key. Windows sends this message before displaying the menu. This allows the application to change the state of menu items before the menu is shown.

Parameter Description  

wParam Contains the menu handle of the menu that is to be initialized.  
lParam Is not used.  

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. This message does not provide information about menu items.