Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CListBox::GetText
CListBox                                    Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int GetText( int nIndex, char FAR* lpBuffer ) const;
  void GetText( int nIndex, CString& rString ) const;
 
  Parameter   Description
 
  <nIndex>    Specifies the zero-based index of the string to be
              retrieved.
 
  <lpBuffer>  Points to the buffer that receives the string. The buffer
              must have sufficient space for the string and a terminating
              null character. The size of the string can be determined
              ahead of time by calling the GetTextLen member function.
 
  <rString>   A reference to a CString object.
 
  Remarks
 
  Gets a string from a list box. The second form of this member function
  fills a CString object with the string text.
 
  Return Value
 
  The length (in bytes) of the string, excluding the terminating null
  character. If <nIndex> does not specify a valid index, the return value
  is LB_ERR.
 
  See Also
 
  CListBox::GetTextLen, LB_GETTEXT
 
 
                                     -♦-