SEC_TREECLASS::InsertItem
Inserts a new item in a tree view control.
Defined in: trcore.inl
Syntax
InsertItem(LPTV_INSERTSTRUCT lpTVIS)
InsertItem(UINT nMask, LPCTSTR lpszItem, int nImage, int nSelectedImage, UINT nState, UINT nStateMask, LPARAM lParam, HTREEITEM hParent, HTREEITEM hInsertAfter)
InsertItem(LPCTSTR lpszItem, HTREEITEM hParent, HTREEITEM hInsertAfter)
InsertItem(LPCTSTR lpszItem, int nImage, int nSelectedImage, HTREEITEM hParent, HTREEITEM hInsertAfter)
Return Value
Handle of the new item if successful; otherwise NULL.
Parameters
lpTVIS
A pointer to a TV_INSERTSTRUCT that specifies the attributes of the tree view item to be inserted.
nMask
Integer specifying which attributes to set.
lpszItem
nImage
Index of the item’s image in the tree view control’s image list.
nSelectedImage
Index of the item’s selected image in the tree view control’s image list.
nState
Specifies values for the item’s states.
nStateMask
Specifies which states are to be set.
lParam
A 32-bit application-specific value associated with the item.
hParent
Handle of the inserted item’s parent.
hInsertAfter
Handle of the item after which the new item is to be inserted.
Comments
Call this function to insert a new item in a tree view control.