ListView_GetItemIndexRect macro

Gets the bounding rectangle for all or part of a subitem in the current view of a specified list-view control. Use this macro or send the LVM_GETITEMINDEXRECT message explicitly.

Syntax

void ListView_GetItemIndexRect(
   hwnd,
   plvii,
   iSubItem,
   code,
   prc
);

Parameters

hwnd

Type: HWND

A handle to the list-view control.

plvii

Type: LVITEMINDEX*

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

iSubItem

Type: LONG

The index of the subitem.

code

Type: LONG

The portion of the list-view subitem for which to retrieve the bounding rectangle. This parameter must be one of the following values.

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.

prc

Type: LPRECT

A pointer to a RECT structure to receive the coordinates. The caller is responsible for allocating this structure. prc must not be NULL.

Return value

None

Remarks

If iSubItem is zero, this macro returns the coordinates of the rectangle to the item pointed to by plvii. The value LVIR_SELECTBOUNDS for the parameter code is not supported.

Requirements

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