CFrameWnd::SetComboCurSel

This method selects 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.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later

Syntax

int SetComboCurSel ( int nSelect );

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.

Remarks

This method of the CFrameWnd class is unique to Windows CE.

See Also

CFrameWnd::GetComboCurSel