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::SetCurSel
CListBox                                    Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int SetCurSel( int nSelect );
 
  Parameter   Description
 
  <nSelect>   Specifies the zero-based index of the string to be selected.
              If <nSelect> is -1, the list box is set to have no
              selection.
 
  Remarks
 
  Selects a string and scrolls it into view, if necessary. When the new
  string is selected, the list box removes the highlight from the
  previously selected string.
 
  Use this member function only with single-selection list boxes. It
  cannot be used to set or remove a selection in a multiple-selection list
  box.
 
  Return Value
 
  LB_ERR if an error occurs.
 
  See Also
 
  LB_SETCURSEL, CListBox::GetCurSel
 
 
                                     -♦-