Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CWnd::OnInitMenu
CWnd                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  afx_msg void OnInitMenu( CMenu*  pMenu );
 
  Parameter   Description
 
  <pMenu>     Specifies the menu to be initialized. May be temporary, and
              should not be stored for later use.
 
  Remarks
 
  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.
 
  See Also
 
  CWnd::OnInitMenuPopup, CWnd::Default, WM_INITMENU
 
 
                                     -♦-