CReBarCtrl::Create

BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );

Return Value

Nonzero if the object was created successfully; otherwise 0.

Parameters

dwStyle

Specifies the combination of rebar control styles applied to the control. See Rebar Control Styles in the Platform SDK for a list of supported styles.

rect

A reference to a CRect object or RECT structure, which is the position and size of the rebar control.

pParentWnd

A pointer to a CWnd object that is the parent window of the rebar control. It must not be NULL.

nID

Specifies the rebar control's control ID.

Remarks

Create a rebar control in two steps:

  1. Call CReBarCtrl to construct a CReBarCtrl object.

  2. Call this member function, which creates the Windows rebar control and attaches it to the CReBarCtrl object.

When you call Create, the common controls are initialized.

Example

CReBarCtrl* pReBarCtrl = new CReBarCtrl();
CRect rect;
GetWindowRect(rect);
pReBarCtrl->Create(RBS_BANDBORDERS, rect, this, AFX_IDW_REBAR);
// Use ReBar Control.
...
delete pReBarCtrl;

CReBarCtrl OverviewClass MembersHierarchy Chart