CComboBox控件的使用:
1、下拉菜单中数据的添加
第一种:在控件属性的Data属性中直接添加,换行为“回车+ctrl”
第二种,使用控件的成员函数AddString();
m_combobox.AddString("wu123");
2、获得选择的属性:
int nIndex = m_combobox.GetCurSel();
CString str ;
m_combobox.GetWindowText(str);
MessageBox(str);
CComboBox控件的使用:
1、下拉菜单中数据的添加
第一种:在控件属性的Data属性中直接添加,换行为“回车+ctrl”
第二种,使用控件的成员函数AddString();
m_combobox.AddString("wu123");
2、获得选择的属性:
int nIndex = m_combobox.GetCurSel();
CString str ;
m_combobox.GetWindowText(str);
MessageBox(str);