TreeView_GetItemRect macro

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


BOOL TreeView_GetItemRect(
   HWND      hwndTV,
   HTREEITEM hitem,
   LPRECT    prc,
   BOOL      fItemRect
);

Parameters

hwndTV

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.

fItemRect

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

If the item is visible and the bounding rectangle is successfully retrieved, the return value is TRUE. Otherwise, the TVM_GETITEMRECT message returns FALSE and does not retrieve the bounding rectangle.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: