CReBarCtrl::Create
Creates the rebar control and attaches it to the CReBarCtrl object.
virtual BOOL Create(
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd,
UINT nID
);
Parameters
dwStyle
Specifies the combination of rebar control styles applied to the control. See Rebar Control Styles in the Windows 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.
Return Value
Nonzero if the object was created successfully; otherwise 0.
Remarks
Create a rebar control in two steps:
Call CReBarCtrl to construct a CReBarCtrl object.
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;
Requirements
Header: afxcmn.h