TreeView_GetItemRect macro (commctrl.h)

Retrieves the bounding rectangle for a tree-view item and indicates whether the item is visible. You can use this macro or send the TVM_GETITEMRECT message explicitly.

Syntax

void TreeView_GetItemRect(
   hwnd,
   hitem,
   prc,
   code
);

Parameters

hwnd

Type: HWND

Handle to the tree-view control.

hitem

Type: HTREEITEM

Handle to the tree-view item.

prc

Type: LPRECT

Pointer to a RECT structure that receives the bounding rectangle. The coordinates are relative to the upper-left corner of the tree-view control.

code

Type: BOOL

Value specifying the portion of the item for which to retrieve the bounding rectangle. If this parameter is TRUE, the bounding rectangle includes only the text of the item. Otherwise, it includes the entire line that the item occupies in the tree-view control.

Return value

None

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