CTreeCtrl::InsertItem

This method inserts a new item in a tree view control.

At a Glance

Header file: Afxcmn.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions:: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

HTREEITEM InsertItem( LPTV_INSERTSTRUCT lpInsertStruct );

HTREEITEM InsertItem(UINT nMask, LPCTSTR lpszItem, int nImage,
int
nSelectedImage, UINT nState, UINT nStateMask, LPARAM lParam, HTREEITEM hParent, HTREEITEM hInsertAfter );

HTREEITEM InsertItem( LPCTSTR lpszItem,
HTREEITEM
hParent = TVI_ROOT,
HTREEITEM
hInsertAfter = TVI_LAST );

HTREEITEM InsertItem( LPCTSTR lpszItem, int nImage,
int
nSelectedImage, HTREEITEM hParent = TVI_ROOT,
HTREEITEM
hInsertAfter = TVI_LAST);

See Also

CTreeCtrl::DeleteItem, CTreeCtrl::HitTest, CTreeCtrl::SelectDropTarget, CTreeCtrl::GetItem