ListView_GetItemRect macro

Gets the bounding rectangle for all or part of an item in the current view. You can use this macro or send the LVM_GETITEMRECT message explicitly.

Syntax


BOOL ListView_GetItemRect(
  [in]  HWND hwnd,
  [in]  int  i,
  [out] RECT *prc,
  [in]  int  code
);

Parameters

hwnd [in]

Type: HWND

A handle to the list-view control.

i [in]

Type: int

The index of the list-view item.

prc [out]

Type: RECT*

A pointer to a RECT structure that receives the bounding rectangle.

code [in]

Type: int

The portion of the list-view item from 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 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 item text.

LVIR_SELECTBOUNDS

Returns the union of the LVIR_ICON and LVIR_LABEL rectangles, but excludes columns in report view.

 

Return value

Returns TRUE if successful, or FALSE otherwise.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: