CTreeCtrl::InsertItem

Call this member function to insert a new item in a tree view control.

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

At a Glance

Header File Afxcmn.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CTreeCtrl Overview, CTreeCtrl Member Functions, Control Classes, CTreeCtrl::DeleteItem, CTreeCtrl::HitTest, CTreeCtrl::SelectDropTarget, CTreeCtrl::GetItem