LVM_GETITEMINDEXRECT message

Retrieves the bounding rectangle for all or part of a subitem in the current view of a list-view control. Send this message explicitly or by using the ListView_GetItemIndexRect macro.

Parameters

wParam [in]

A pointer to a LVITEMINDEX structure for the parent item of the subitem. The calling process is responsible for allocating this structure and setting its members. wParam must not be NULL.

lParam [in, out]

A pointer to a RECT structure to receive the coordinates. The calling process is responsible for allocating this structure. lParam must not be NULL. Set the top member to the index of the subitem. Set the left member to one of the following values, indicating the part of the subitem for which the bounding rectangle is to be retrieved.

Value Meaning
LVIR_BOUNDS
Returns the bounding rectangle of the entire subitem, including the icon and label.
LVIR_ICON
Returns the bounding rectangle of the icon or small icon of the subitem.
LVIR_LABEL
Returns the bounding rectangle of the subitem text.

Return value

Returns TRUE if successful, or FALSE otherwise.

Requirements

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