Help Center

CListView.GetItemIndexRectmethod

Gets the bounding rectangle for all or part of a subitem in the current view of a specified list-view control.

WindowsmethodCListView.incdocumented

Syntax

FUNCTION GetItemIndexRect (BYVAL hListView AS HWND, BYVAL pvii AS LVITEMINDEX PTR, BYVAL iSubItem AS LONG, BYVAL code AS LONG, BYVAL prc AS RECT PTR) AS BOOLEAN
FUNCTION GetItemIndexRect (BYVAL hListView AS HWND, BYREF lvii AS LVITEMINDEX, BYVAL iSubItem AS LONG, BYVAL code AS LONG, BYREF rc AS RECT) AS BOOLEAN
FUNCTION GetItemIndexRect (BYVAL hListView AS HWND, BYREF vii AS LVITEMINDEX, BYVAL iSubItem AS LONG, BYVAL code AS LONG) AS RECT

Parameters

NameDescription
hListViewHandle to the ListView control.
lviiA 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.
iSubItemThe index of the subitem.
codeThe portion of the list-view subitem for which to retrieve the bounding rectangle. This parameter must be one of the following values (see table below):
prcA 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.

Description

Gets the bounding rectangle for all or part of a subitem in the current view of a specified list-view control.

Remarks

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

Reference

  • Include file CListView.inc
  • Defined in AfxNova/CListView.inc:2260
  • Documented in Windows/WIndows Controls/CListView Class.md
  • Topic: CListView Class