combo box的使用问题
我把combo box的type设置成了drop list,然后给combobox类增加了两个成员变量int m_nKind和CComboBox m_contCB
程序段如下,目的是要获得当前combobox的值,放到str里面去,可以运行是报错,不知道为什么
void CTestmfc1View::OnEditRegister()
{
// TODO: Add your command handler code here
CRegisterDialog dlg;
if(dlg.DoModal()==IDOK)
{
CString str;
dlg.m_contCB.GetLBText(dlg.m_nKind,str);
}
}