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

CListCtrl::GetItemText

Retrieves the text of a list view item or subitem.

int GetItemText( 
   int nItem, 
   int nSubItem, 
   LPTSTR lpszText, 
   int nLen  
) const; 
CString GetItemText( 
   int nItem, 
   int nSubItem  
) const;
nItem

The index of the item whose text is to be retrieved.

nSubItem

Specifies the subitem whose text is to be retrieved.

lpszText

Pointer to a string that is to receive the item text.

nLen

Length of the buffer pointed to by lpszText.

The version returning int returns the length of the retrieved string.

The version returning a CString returns the item text.

If nSubItem is zero, this function retrieves the item label; if nSubItem is nonzero, it retrieves the text of the subitem. For more information on the subitem argument, see the discussion of the LVITEM structure in the Windows SDK.

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.