ListView_GetSubItemRect macro

Gets information about the rectangle that surrounds a subitem in a list-view control. You can use this macro (recommended) or send the LVM_GETSUBITEMRECT message explicitly. This macro is intended to be used only on list-view controls that use the LVS_REPORT style.

Syntax

void ListView_GetSubItemRect(
   hwnd,
   iItem,
   iSubItem,
   code,
   prc
);

Parameters

hwnd

Type: HWND

A handle to a list-view control.

iItem

Type: int

The index of the subitem's parent item.

iSubItem

Type: int

The one-based index of the subitem.

code

Type: int

A portion of the list-view subitem for which to retrieve the bounding rectangle information. This value can be one of the following:

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.

prc

Type: LPRECT

Pointer to a RECT structure that receives the subitem bounding rectangle information.

Return value

None

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h