标题:请教:这是什么错误?left of ...must have class/struct/union type
只看楼主
cady_s
Rank: 1
来 自:天津
等 级:新手上路
帖 子:21
专家分:0
注 册:2009-10-31
结帖率:50%
已结贴  问题点数:5 回复次数:3 
请教:这是什么错误?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
张丹
Rank: 2
等 级:论坛游民
帖 子:94
专家分:66
注 册:2010-6-7
得分:1 
m_IDC_3389_NEW没有声明,找不到资源。
2010-09-08 15:51
蛤蟆VS天鹅
Rank: 3Rank: 3
来 自:徐州
等 级:论坛游侠
威 望:1
帖 子:26
专家分:110
注 册:2010-8-22
得分:1 
看看'm_IDC_3389_OLD' 是不是局部变量,有没有此变量或变量名错误
2010-09-14 11:25
bydzyj
Rank: 3Rank: 3
等 级:论坛游侠
威 望:3
帖 子:38
专家分:123
注 册:2010-8-8
得分:1 
同意楼上,没有资源。
2010-09-14 19:02



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




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

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