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
If an application processes this message, it should return zero.
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.
Keyboard Accelerators Overview, Keyboard Accelerator Messages, WM_INITMENU