Compartilhar via


CMFCMenuBar::Create

Creates a menu control and attaches it to a CMFCMenuBar object.

virtual BOOL Create(
   CWnd* pParentWnd,
   DWORD dwStyle = AFX_DEFAULT_TOOLBAR_STYLE,
   UINT nID = AFX_IDW_MENUBAR
);

Parameters

  • [in] pParentWnd
    Pointer to the parent window for the new CMFCMenuBar object.

  • [in] dwStyle
    The style of the new menu bar.

  • [in] nID
    The ID for the child window of the menu bar.

Return Value

TRUE if successful; otherwise FALSE.

Remarks

After you construct a CMFCMenuBar object, you must call Create. This method creates the CMFCMenuBar control and attaches it to the CMFCMenuBar object.

For more information about toolbar styles, see CBasePane::SetPaneStyle.

Requirements

Header: afxmenubar.h

See Also

Reference

CMFCMenuBar Class

Hierarchy Chart