Removes an item and all its children from a tree-view control. You can send this message explicitly or by using the TreeView_DeleteItem macro.
- Must be zero.
HTREEITEM handle to the item to delete. If lParam is set to TVI_ROOT or to NULL, all items are deleted. You can also use the TreeView_DeleteAllItems macro to delete all items.
Returns TRUE if successful, or FALSE otherwise.
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 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|