标题:请教:这是什么错误?left of ...must have class/struct/union type
取消只看楼主
cady_s
Rank: 1
来 自:天津
等 级:新手上路
帖 子:21
专家分:0
注 册:2009-10-31
结帖率:50%
已结贴  问题点数:5 回复次数:0 
请教:这是什么错误?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
搜索更多相关主题的帖子: union class type struct left 
2010-09-08 15:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-319576-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.255431 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved