afx_msg void OnInitMenu( CMenu* pMenu );
pMenu
Specifies the menu to be initialized. May be temporary, and should not be stored for later use.
Called when a menu is about to become active. The call occurs when the user clicks an item on the menu bar or presses a menu key. Override this member function in order to modify the menu before it is displayed.
OnInitMenu is only called when a menu is first accessed; OnInitMenu is called only once for each access. This means, for example, that moving the mouse across several menu items while holding down the button does not generate new calls. This call does not provide information about menu items.
This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_INITMENU message.
CWnd::OnInitMenuPopup, CWnd::Default, WM_INITMENU