LVM_GETSUBITEMRECT message

Retrieves information about the bounding rectangle for a subitem in a list-view control. You can send this message explicitly or by using the ListView_GetSubItemRect macro (recommended). This message is intended to be used only with list-view controls that use the LVS_REPORT style.

Parameters

wParam

Index of the subitem's parent item.

lParam

Pointer to a RECT structure that will receive the subitem bounding rectangle information. Its members must be initialized according to the following member/value relationships:

Value Meaning
top
The one-based index of the subitem.
left
Flag value (see remarks). Indicates the portion of the list-view subitem for which to retrieve the bounding rectangle.

Return value

Returns nonzero if successful, or zero otherwise.

Remarks

Following are the flag values that may be set.

Requirement Value
Flag Value Meaning
LVIR_BOUNDS Returns the bounding rectangle of the entire item, including the icon and label.
LVIR_ICON Returns the bounding rectangle of the icon or small icon.
LVIR_LABEL Returns the bounding rectangle of the entire item, including the icon and label. This is identical to LVIR_BOUNDS.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h