CTabCtrl::Create

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

Return Value

TRUE if initialization of the object was successful; otherwise FALSE.

Parameters

dwStyle

Specifies the tab control’s style. Apply any combination of tab control styles to the control.

rect

Specifies the tab control’s size and position. It can be either a CRect object or a RECT structure.

pParentWnd

Specifies the tab control’s parent window, usually a CDialog. It must not be NULL.

nID

Specifies the tab control’s ID.

Remarks

You construct a CTabCtrl object in two steps. First call the constructor, then call Create, which creates the tab control and attaches it to the CTabCtrl object.

The following styles can be applied to a tab control:

In addition, you can apply the following window styles to a tab control:

Example

// Assuming you have a member variable m_pTabCtrl, that is a CTabCtrl
// pointer, you can use the following to create a tab control.

m_pTabCtrl->Create(TCS_TABS | TCS_FIXEDWIDTH | WS_CHILD | WS_VISIBLE,
   &rect, this, 0x1006);

// This creates a tab control with the given styles, and with
// an ID of 0x1006.

CTabCtrl OverviewClass MembersHierarchy Chart

See Also   CTabCtrl::CTabCtrl