CFrameWnd::SetComboCurSel

Call this member function to select an element in the list box of the command bar's combo box. If necessary, the list box scrolls the string into view. The text in the edit control of the combo box is changed to reflect the new selection. Any previous selection in the list box is removed.

Syntax

int SetComboCurSel ( int nSelect );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later

Parameters

nSelect
Specifies the zero-based index of the string to select. If -1, any current selection in the list box is removed and the edit control is cleared.

Return Value

The zero-based index of the item selected. The return value is CB_ERR if nSelect is greater than the number of items in the list or if nSelect is set to -1, which clears the selection.

Note This member function of the CFrameWnd class is unique to Windows CE.

See Also

CFrameWnd Overview, CFrameWnd Member Functions, Frame Windows and Splitter Windows, CFrameWnd::GetComboCurSel