CToolBar::Create

BOOLCreate(CWnd*pParentWnd,DWORDdwStyle**=WS_CHILD|WS_VISIBLE|CBRS_TOP,UINTnID=AFX_IDW_TOOLBAR);**

Return Value

Nonzero if successful; otherwise 0.

Parameters

pParentWnd

Pointer to the window that is the toolbar’s parent.

dwStyle

The toolbar style. Additional toolbar styles supported are:

  • CBRS_TOP   Control bar is at top of the frame window.

  • CBRS_BOTTOM   Control bar is at bottom of the frame window.

  • CBRS_NOALIGN   Control bar is not repositioned when the parent is resized.

  • CBRS_TOOLTIPS   Control bar displays tool tips.

  • CBRS_SIZE_DYNAMIC   Control bar is dynamic.

  • CBRS_SIZE_FIXED   Control bar is fixed.

  • CBRS_FLOATING   Control bar is floating.

  • CBRS_FLYBY   Status bar displays information about the button.

  • CBRS_HIDE_INPLACE   Control bar is not displayed to the user.

nID

The toolbar’s child-window ID.

Remarks

This member function creates a Windows toolbar (a child window) and associates it with the CToolBar object. It also sets the toolbar height to a default value.

CToolBar OverviewClass MembersHierarchy Chart

See Also   CToolBar::CToolBar, CToolBar::LoadBitmap, CToolBar::SetButtons, CToolBar::LoadToolBar, CControlBar::CalcDynamicLayout, CControlBar::CalcFixedLayout