ListView_SetItemText macro

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(
   HWND    hwnd,
   int     i,
   int     iSubItem,
   LPCTSTR pszText
);

Parameters

hwnd

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

No return value.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: