ListView_SetItemText macro (commctrl.h)

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

Syntax

void ListView_SetItemText(
   hwndLV,
   i,
   iSubItem_,
   pszText_
);

Parameters

hwndLV

Type: HWND

A handle to the list-view control.

i

Type: int

The zero-based index of the list-view item.

iSubItem_

Type: int

The one-based index of the subitem. To set the item label, set iSubItem to zero.

pszText_

Type: LPCTSTR

A pointer to a null-terminated string that contains the new text. This parameter can be LPSTR_TEXTCALLBACK to indicate a callback item for which the parent window stores the text. In this case, the list-view control sends the parent an LVN_GETDISPINFO notification code when it needs the text. This parameter can be NULL.

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