TVM_GETITEMRECT (Windows Embedded CE 6.0)
1/6/2010
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.
Syntax
TVM_GETITEMRECT wParam = (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 Value
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
Header | commctrl.h |
Windows Embedded CE | Windows CE 1.0 and later |