TreeView_SetItemState macro (commctrl.h)

Sets a tree-view item's state attributes. You can use this macro or send the TVM_SETITEM message explicitly.

Syntax

UINT TreeView_SetItemState(
   HWND      hwndTV,
   HTREEITEM hti,
   UINT      data,
   UINT      _mask
);

Parameters

hwndTV

Type: HWND

Handle to the tree-view control.

hti

Type: HTREEITEM

Handle to the item.

data

Type: UINT

Value that is equivalent to the data member of TVITEMEX.

_mask

Type: UINT

Mask used to select the states to be set. It is equivalent to the _mask member of TVITEMEX.

Return value

Type: UINT

The return value is not used.

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