The TVM_GETCOUNT message retrieves a count of the items in a tree-view control. You can send this message explicitly or by using the TreeView_GetCount macro.
TVM_GETCOUNT
wParam = 0;
lParam = 0;
Return Values
Returns the count of items.
See Also