更新时间:2020-12-24 16:57
CurSel是一个英文缩写,全称是current selection,即“当前选项”的意思。
CComboBox::SetCurSel
在此处
int SetCurSel( int nSelect );
调用成功时返回选中的项的下标。如果 nSelect 大于列表中项的个数,则返回 CB_ERR 。如果 nSelect 为 -1 ,则清除当前的选择并返回 CB_ERR 。
This method selects a tab in a tab control. A tab control does not send a TCN_SELCHANGING or TCN_SELCHANGE notification message when a tab is selected using this method. These notifications are sent, using WM_NOTIFY, when the user clicks or uses the keyboard to change tabs.
int SetCurSel( int nItem);ParametersnItemSpecifies the zero-based index of the item to be selected. Return Value
Zero-based index of the previously selected tab if it is successful; otherwise, it is –1.
Requirements
Windows CE versions:1.0 and later
Header file:Declared in Afxcmn.h