CGXControl::GetChoiceListItem

virtual BOOL GetChoiceListItem(CString& strResult, LPCTSTR pszChoiceList, int nIndex);

strResult

A reference to a string where the method stores the found entry.

pszChoiceList

A pointer to a zero-terminated string which holds the choice list.

nIndex

Specifies the zero-based index of the entry to be read out.

Return Value

Specifies whether the operation was successful. If it is non-zero, a strResult holds a valid entry; if it is FALSE, no entry could be found.

Remarks

Reads out the choice list entry specified through a zero-based index from a given string.

For example,

   CString strResult;
   GetChoiceListItem(strResult, " zero \n one \n two\n three \n", 2);

will read out “two”.

See Also

 CGXControl::FindStringInChoiceList

CGXControl

 Class Overview |  Class Members