Deletes all nodes from a TreeView control.
Takes parentTreeview (Int).
Returns 1 on success, -1 if TreeView not found or deletion failed.
BGI GUI
Parameters & Returns
Parameters
parentTreeviewInt
Returns
Int
Quick Summary
Deletes all nodes from a TreeView control.
Takes parentTreeview (Int).
Returns 1 on success, -1 if TreeView not found or deletion failed.
Technical Exegesis...
Deletes all nodes from a TreeView control. Searches gizmoMap for parentTreeview ID to get TreeView HWND. Calls TreeView_DeleteAllItems macro to delete all nodes from the TreeView. If successful, iterates through treeviewNodes vector and erases all entries where parentHWND matches the TreeView HWND. Returns 1 on success, -1 if TreeView not found or deletion failed.
This function clears the entire TreeView - all root nodes and all nested children are removed.
Deletes all nodes from a TreeView control. Searches gizmoMap for parentTreeview ID to get TreeView HWND. Calls TreeView_DeleteAllItems macro to delete all nodes from the TreeView. If successful, iterates through treeviewNodes vector and erases all entries where parentHWND matches the TreeView HWND. Returns 1 on success, -1 if TreeView not found or deletion failed.
This function clears the entire TreeView - all root nodes and all nested children are removed. TreeView_DeleteAllItems is a Windows Common Controls macro that wraps TVM_DELETEITEM with NULL handle (deletes everything). The function also cleans up the tracking vector by removing all CTreeViewNode entries for this TreeView. Other TreeViews' nodes remain in the vector (only matching parentHWND entries are erased). Use for resetting TreeView, reloading data, or clearing temporary hierarchies. After clearing, TreeView is empty - use bgiAttachGizmoRootNode to add new content.