Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message changes the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_SetItemTextmacro.

Syntax

LVM_SETITEMTEXT 
wParam = (WPARAM)(int) 
i; 

lParam = (LPARAM)(LVITEM FAR *) 
pitem;

Parameters

i

Index of the list-view item.

pitem

Pointer to an LVITEMstructure. The iSubItemmember is the index of the subitem, or it can be zero to set the item label. The pszTextmember is the address of a null-terminated string containing the new text; it can also be NULL.

The pszTextmember can also 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 message when it needs the text.

Return Value

If you send this message explicitly, TRUE indicates success. FALSE indicates failure.

Remarks

Related macro:  ListView_SetItemText

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also