TreeView_GetItemRect

The 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 explicitly send the TVM_GETITEMRECT message.

BOOL TreeView_GetItemRect(

hwnd,  
hitem,  
prc,  
fItemRect  
);  

Parameters

hwnd

Handle to the tree-view control.

hitem

Handle to the tree-view item.

prc

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

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 Values

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

See Also

RECT, TVM_GETITEMRECT