Поделиться через


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 
);

Параметры

  • 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.

Возвращаемое значение

Nonzero if the object was created successfully; otherwise 0.

Заметки

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.

Пример

CReBarCtrl* pReBarCtrl = new CReBarCtrl();
CRect rect;
GetWindowRect(rect);
pReBarCtrl->Create(RBS_BANDBORDERS, rect, this, AFX_IDW_REBAR);

// Use ReBar Control.

delete pReBarCtrl;   

Требования

Header: afxcmn.h

См. также

Основные понятия

CReBarCtrl Class

CReBarCtrl Members

Hierarchy Chart

CReBarCtrl::CReBarCtrl

CReBarCtrl::CreateEx