Compartilhar via


CMFCToolBar::Create

Creates a CMFCToolBar object.

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

Parameters

  • [in] pParentWnd
    A pointer to the parent window of the toolbar.

  • [in] dwStyle
    The toolbar style. See Toolbar Control and Button Styles in the Windows SDK for the list of styles.

  • [in] nID
    The ID of the child window of the toolbar.

Return Value

TRUE if this method succeeds; otherwise FALSE.

Remarks

This method creates a control bar and attaches it to the toolbar. It creates the control bar with the TBSTYLE_FLAT style. Call CMFCToolBar::CreateEx if you want a different control bar style.

Requirements

Header: afxtoolbar.h

See Also

Reference

CMFCToolBar Class

Hierarchy Chart

CMFCToolBar::CreateEx