TreeView_GetCount macro (commctrl.h)

Retrieves a count of the items in a tree-view control. You can use this macro or send the TVM_GETCOUNT message explicitly.

Syntax

UINT TreeView_GetCount(
   HWND hwnd
);

Parameters

hwnd

Type: HWND

Handle to the tree-view control.

Return value

Type: UINT

Returns the count of items.

Remarks

The node count returned by TreeView_GetCount is limited to integer values. If you add a node beyond 32767 the macro returns a negative value. After adding 65536 nodes the count returns to zero. When this occurs, the tree-view control appears empty with no scrollbars. For more information see the Knowledge Base article Q182231.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h