Windows Dev Center

Expand Minimize

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


BOOL ListView_GetItemIndexRect(
  [in]      HWND        hwnd,
  [in]      LVITEMINDEX *plvii,
  [in]      LONG        iSubItem,
  [in]      LONG        code,
  [in, out] LPRECT      prc
);

Parameters

hwnd [in]

Type: HWND

A handle to the list-view control.

plvii [in]

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 [in]

Type: LONG

The index of the subitem.

code [in]

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.

ValueMeaning
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 [in, out]

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

Returns TRUE if successful, or FALSE otherwise.

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]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft