调试中问题
这是谁都知道的一段程序:
void CMySeriesDlg::OnBtnopen() //打开按键
{
// TODO: Add your control notification handler code here
CComboBox *pCmbName = NULL;
CComboBox *pCmbBaud = NULL;
CComboBox *pCmbParity = NULL;
CComboBox *pCmbDataBits = NULL;
CComboBox *pCmbStopBits = NULL;
pCmbName = (CComboBox*)GetDlgItem(IDC_CMBNAME);
pCmbBaud = (CComboBox*)GetDlgItem(IDC_CMBBAUD);
pCmbParity = (CComboBox*)GetDlgItem(IDC_CMBPARITY);
pCmbDataBits = (CComboBox*)GetDlgItem(IDC_CMBDATABITS);
pCmbStopBits = (CComboBox*)GetDlgItem(IDC_CMBSTOPBITS);
ASSERT(pCmbName != NULL);
ASSERT(pCmbBaud != NULL);
ASSERT(pCmbParity != NULL);
ASSERT(pCmbDataBits != NULL);
ASSERT(pCmbStopBits != NULL);
//得到串口编号
CString tmpCommName;
pCmbName->GetWindowText(tmpCommName);
m_portNo = _wtoi(tmpCommName);
//得到波特率
CString tmpBaud;
pCmbBaud->GetWindowText(tmpBaud);
pCmbBaud->m_baud = _wtoi(tmpBaud);
//得到奇偶校验
m_parity = pCmbParity->GetCurSel();
//得到数据位
CString tmpDataBits;
pCmbDataBits->GetWindowText(tmpDataBits);
m_databits = _wtoi(tmpDataBits);
//得到停止位
m_stopbits = pCmbStopBits->GetCurSel();
OnOK();
}
编译后出现的错误:
Compiling...
MySeriesDlg.cpp
d:\backup\我的文档\evc4.0\myseries\myseriesdlg.cpp(99) : error C2039: 'm_baud' : is not a member of 'CComboBox'
e:\program files\windows ce tools\wce420\sss\mfc\include\afxwin.h(2911) : see declaration of 'CComboBox' 。。。。。(1)
d:\backup\我的文档\evc4.0\myseries\myseriesdlg.cpp(101) : error C2593: 'operator =' is ambiguous。。。。。。。。。。。。。。。(2)
d:\backup\我的文档\evc4.0\myseries\myseriesdlg.cpp(107) : error C2593: 'operator =' is ambiguous。。。。。。。。。。。。。。。(3)
Error executing clarm.exe.
MySeriesDlg.obj - 3 error(s), 0 warning(s)
请问是哪里出现了问题?
麻烦逐一解答!
谢谢!