WM_INITMENUPOPUP
The WM_INITMENUPOPUP message is sent when a drop-down menu or submenu is about to become active. This allows an application to modify the menu before it is displayed, without changing the entire menu.
WM_INITMENUPOPUP
hmenuPopup = (HMENU) wParam; // handle to submenu
uPos = (UINT) LOWORD(lParam); // submenu item position
fSystemMenu = (BOOL) HIWORD(lParam); // window menu flag
Parameters
hmenuPopup
Value of wParam. Handle to the drop-down menu or submenu.
uPos
Value of the low-order word of lParam. Specifies the zero-based relative position of the menu item that opens the drop-down menu or submenu.
fSystemMenu
Value of the high-order word of lParam. Specifies whether the drop-down menu is the window menu (also known as the System menu or the Control menu). If the menu is the window menu, this parameter is TRUE; otherwise, it is FALSE.
Return Values
If an application processes this message, it should return zero.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.