MFC界面之表格下拉框
作者:互联网
传统方法:
//方法1: CString str; GetDlgItem(IDC_COMBO_NETCARD)->GetWindowText(str); //获得组合框中的选中内容 int nChID = atoi(str); TRACE("%s", str); TRACE("%d", nChID); //方法2: int index = m_NetCard.GetCurSel();//m_NetCard为CComboBox控件关联的变量 m_NetCard.GetLBText(index, str); MessageBox(str); //方法3: int nChID = ((CComboBox*)GetDlgItem(IDC_COMBO_AIXS))->GetCurSel();
标签:MFC,表格,nChID,int,CComboBox,NetCard,str,COMBO,下拉框 来源: https://www.cnblogs.com/WinkJie/p/15253602.html