ListView_GetItemText macro (commctrl.h)

Gets the text of a list-view item or subitem. You can use this macro or send the LVM_GETITEMTEXT message explicitly.

To get the length of the retrieved string, send the LVM_GETITEMTEXT message explicitly.

Syntax

void ListView_GetItemText(
   HWND   hwndLV,
   int    i,
   int    iSubItem_,
   LPTSTR pszText_,
   int    cchTextMax_
);

Parameters

hwndLV

Type: HWND

A handle to the list-view control.

i

Type: int

The index of the list-view item.

iSubItem_

Type: int

The index of the subitem. To retrieve the item text, set iSubItem_ to zero.

pszText_

Type: LPTSTR

A pointer to a buffer that receives the item or subitem text.

cchTextMax_

Type: int

The number of characters in the pszText_ buffer.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h

See also

LVITEM