Share via


TVM_GETITEMRECT (Windows CE 5.0)

Send Feedback

This message 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.

TVM_GETITEMRECTwParam= (WPARAM)(BOOL)fItemRect;lParam= (LPARAM)(RECT FAR*)prc;

Parameters

  • fItemRect
    Boolean value that specifies the portion of the item for which to retrieve the bounding rectangle. If set to TRUE, the bounding rectangle includes only the text of the item. If set to FALSE, it includes the entire line that the item occupies in the tree view control.
  • prc
    Pointer to a RECT structure that, when sending the message, contains the handle of the item to retrieve the rectangle for. For more information on how to place the item handle in this parameter, see the Remarks section. 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.

Return Values

TRUE indicates that the item is visible and the bounding rectangle was successfully retrieved. If the item is not visible, the message returns FALSE and does not retrieve the bounding rectangle.

Remarks

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 code example.

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

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.

See Also

TreeView_GetItemRect | RECT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.