Combo Box

作者在 2008-05-04 00:29:55 发布以下内容
    //初始化星期
    m_Day.AddString("星期天");
    m_Day.AddString("星期一");
    m_Day.AddString("星期二");
    m_Day.AddString("星期三");
    m_Day.AddString("星期四");
    m_Day.AddString("星期五");
    m_Day.AddString("星期六");
对于Combo Box钟的变量,使用上面的语句添加和使用附图对话框直接添加等效
基础知识 | 阅读 3141 次
文章评论,共1条
vfdff(作者)
2008-05-04 00:36
1
int SetCurSel( int nSelect );// 使用此函数选择

Remarks

Selects a string in the list box of a combo box. If necessary, the list box scrolls the string into view (if the list box is visible). 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.

Example

// The pointer to my combo box.
extern CComboBox* pmyComboBox;

// Select the last item in the combo box.
int nCount = pmyComboBox->GetCount();
if (nCount > 0)
   pmyComboBox->SetCurSel(nCount-1);
游客请输入验证码
浏览1936562次