TVM_GETITEMRECTTVM_GETITEMRECT*
*Contents  *Index  *Topic Contents
*Previous Topic: TVM_GETITEMHEIGHT
*Next Topic: TVM_GETNEXTITEM

TVM_GETITEMRECT


TVM_GETITEMRECT 
    wParam = (WPARAM) (BOOL) fItemRect; 
    lParam = (LPARAM) (LPRECT) prc; 

Retrieves the bounding rectangle for a tree view item and indicates whether the item is visible. You can send this message explicitly or by using the TreeView_GetItemRect macro.

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.
prc
Address of a RECT structure that, when sending the message, contains the handle of the item to retrieve the rectangle for. See the example below for more information on how to place the item handle in this parameter. After returning from the message, this parameter contains the bounding rectangle. The coordinates are relative to the upper-left corner of the tree view control.

When sending this message, the prc parameter contains the handle of the item that the rectangle is being retrieved for. The handle is placed in prc as shown in the following example:

RECT rc;
*(HTREEITEM*)&rc = hTreeItem;
SendMessage(hwndTreeView, TVM_GETITEMRECT, FALSE, (LPARAM)&rc);

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.