Export (0) Print
Expand All
MFC
Expand Minimize
This topic has not yet been rated - Rate this topic

CListCtrl::SetItemText

Changes the text of a list view item or subitem.

BOOL SetItemText(
   int nItem,
   int nSubItem,
   LPCTSTR lpszText 
);
nItem

Index of the item whose text is to be set.

nSubItem

Index of the subitem, or zero to set the item label.

lpszText

Pointer to a string that contains the new item text.

Nonzero if successful; otherwise zero.

This method is not intended for use with controls containing the LVS_OWNERDATA window style (in fact, this will cause an assertion in Debug builds). For more information about this list control style, see List-View Controls Overview.

See the example for CListCtrl::InsertItem.

Header: afxcmn.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.