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


BOOL ListView_GetSubItemRect(
   HWND   hwndLV,
   int    iItem,
   int    iSubItem,
   int    code,
   LPRECT lpRect
);

Parameters

hwndLV

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:

ValueMeaning
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.

 

lpRect

Type: LPRECT

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

Return value

Returns nonzero if successful, or zero otherwise.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: