Initializes a CMFCMenuBar object. This method models the CMFCMenuBar object after a HMENU parameter.

virtual void CreateFromMenu(
   HMENU hMenu,
   BOOL bDefaultMenu = FALSE,
   BOOL bForceUpdate = FALSE


  • [in] hMenu
    A handle to a menu resource. CreateFromMenu uses this resource as a template for the CMFCMenuBar.

  • [in] bDefaultMenu
    A Boolean that indicates whether the new menu is the default menu.

  • [in] bForceUpdate
    A Boolean that indicates whether this method forces a menu update.


Use this method if you want a menu control to have the same menu items as a menu resource. You call this method after you call either CMFCMenuBar::Create or CMFCMenuBar::CreateEx.


Header: afxmenubar.h

See Also


CMFCMenuBar Class

Hierarchy Chart