请教:这是什么错误?left of ...must have class/struct/union type
刚开始学VC,想按照别人编的代码自己操作一下。在按钮的事件里添加了下面语句:void CCh33891Dlg::Button1()
{
CString strNewPort;
m_IDC_3389_NEW.GetWindowText(strNewPort);
if(strNewPort.IsEmpty() || strNewPort==_T(""))
{
AfxMessageBox("请填写新端口");
m_IDC_3389_NEW.SetFocus();
return;
}
...
}
怎么人家的源码可以正常运行。我的确出现了一堆错误:请教懂得朋友们,这是什么错误呢,应该怎么修改?谢谢大家!
E:\C++test\Ch33891\Ch33891Dlg.cpp(150) : error C2065: 'm_IDC_3389_OLD' : undeclared identifier
E:\C++test\Ch33891\Ch33891Dlg.cpp(150) : error C2228: left of '.SetWindowTextA' must have class/struct/union type
E:\C++test\Ch33891\Ch33891Dlg.cpp(153) : error C2228: left of '.SetWindowTextA' must have class/struct/union type
E:\C++test\Ch33891\Ch33891Dlg.cpp(156) : error C2228: left of '.SetWindowTextA' must have class/struct/union type
E:\C++test\Ch33891\Ch33891Dlg.cpp(158) : error C2065: 'IDC_3389_NEW' : undeclared identifier
E:\C++test\Ch33891\Ch33891Dlg.cpp(158) : error C2227: left of '->EnableWindow' must point to class/struct/union
E:\C++test\Ch33891\Ch33891Dlg.cpp(226) : error C2065: 'm_IDC_3389_NEW' : undeclared identifier
E:\C++test\Ch33891\Ch33891Dlg.cpp(226) : error C2228: left of '.GetWindowTextA' must have class/struct/union type
E:\C++test\Ch33891\Ch33891Dlg.cpp(230) : error C2228: left of '.SetFocus' must have class/struct/union type