Поделиться через


CMFCMenuBar::CreateFromMenu

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
);

Parameters

  • [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.

Remarks

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.

Requirements

Header: afxmenubar.h

See Also

Reference

CMFCMenuBar Class

Hierarchy Chart