ListView_GetSubItemRect

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This macro retrieves information about the rectangle that surrounds a subitem in a list-view control. 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
    Handle to a list-view control.
  • iItem
    Index of the subitem's parent item.
  • iSubItem
    One-based index of the subitem.
  • code
    Portion of the list-view subitem for which to retrieve the bounding rectangle information. It is one of the following values.

    Value Description

    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
    Long pointer to a RECT structure that receives the subitem bounding rectangle information.

Return Value

Nonzero indicates success. Zero indicates otherwise.

Remarks

Related message: LVM_GETSUBITEMRECT

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

LVM_GETSUBITEMRECT
List-View Controls Macros