TreeView_DeleteItem macro (commctrl.h)
Removes an item and all its children from a tree-view control. You can also send the TVM_DELETEITEM message explicitly.
void TreeView_DeleteItem( hwnd, hitem );
Handle to the tree-view control.
HTREEITEM handle to the item to delete. If hitem is set to TVI_ROOT, all items are deleted from the tree-view control. You can also use the TreeView_DeleteAllItems macro to delete all items.
It is not safe to delete items in response to a notification such as TVN_SELCHANGING.
Once an item is deleted, its handle is invalid and cannot be used.
The parent window receives a TVN_DELETEITEM notification code when each item is removed.
If the item label is being edited, the edit operation is canceled and the parent window receives the TVN_ENDLABELEDIT notification code.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|