CTreeCtrl::Create

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

Return Value

Nonzero if initialization was successful; otherwise 0.

Parameters

dwStyle

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

rect

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

pParentWnd

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

nID

Specifies the tree view control’s ID.

Remarks

If you specify the tree control in a dialog box template, or if you are using CTreeView, your tree control is created automatically when the dialog box or view is created. If you want to create the tree control as a child window of some other window, use the Create member function. If you create the tree control using Create, you must pass it WS_VISIBLE, in addition to other tree view styles.

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

The following styles can be applied to a tree view control:

CTreeCtrl OverviewClass MembersHierarchy Chart

See Also   CTreeCtrl::CTreeCtrl, Tree View Control Window Styles in the Platform SDK