CListBox::GetText int GetText( int nIndex, LPTSTR lpszBuffer ) const;void GetText( int nIndex, CString& rString ) const; CListBox myBox; int idx = myBox.GetCurSel(); CString sInfo; myBox.GetText(idx,sInfo);
CListBox* pmyListBox; //...... // Select the next item of the currently selected one. int nIndex = pmyListBox->GetCurSel(); CString strText; int n = pmyListBox->GetTextLen( nIndex ); pmyListBox->GetText( i, strText.GetBuffer(n) );//结果在strText中
int GetText( int nIndex, LPTSTR lpszBuffer ) const;void GetText( int nIndex, CString& rString ) const;
CListBox myBox;
int idx = myBox.GetCurSel();
CString sInfo;
myBox.GetText(idx,sInfo);
//......
// Select the next item of the currently selected one.
int nIndex = pmyListBox->GetCurSel();
CString strText;
int n = pmyListBox->GetTextLen( nIndex );
pmyListBox->GetText( i, strText.GetBuffer(n) );//结果在strText中