VC++编程问题
这个错误是不我VC版本不行,缺少的东西?如何解决?
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(184) : error C2039: 'FindString' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(186) : error C2039: 'AddString' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(193) : error C2039: 'SetItemDataPtr' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(195) : error C2039: 'SetCurSel' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(196) : error C2065: 'OnChangeCombo' : undeclared identifier
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(201) : error C2039: 'GetCurSel' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(204) : error C2228: left of '.ResetContent' must have class/struct/union type
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(206) : error C2039: 'GetItemDataPtr' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(209) : error C2228: left of '.AddString' must have class/struct/union type
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(211) : error C2228: left of '.AddString' must have class/struct/union type
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(214) : error C2228: left of '.AddString' must have class/struct/union type
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(223) : error C2039: 'GetCount' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\Ex_CtrlsDlg.cpp(224) : error C2039: 'GetItemDataPtr' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
InputDlg.cpp
D:\程序制作\Ex_Ctrls1\InputDlg.cpp(65) : error C2039: 'trimLeft' : is not a member of 'CString'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
D:\程序制作\Ex_Ctrls1\InputDlg.cpp(80) : error C2039: 'SetRange' : is not a member of 'CScrollBar'
上面的乱讲,程序有错,不是丛吵版本问题,在程序定义变量类型时出错了,用'FindString' 函数的变量类型明显不应该是CString类型,而是CCombox或CList类型,改了这个就只剩下最后一个错了,最后一个看是不是滚动条,是的话把SetRange改成SetScrollRange,不是的话就把变量类渗丛侍型改成所需的类型, 可以把程序发给我,直接郑手帮你改
你的程序用的是碰锋新版的MFC, 但是你的VC里带的版本是旧版的. 要并腔么安装新版的VC, 要么把新版的MFC弄过来. 不过建议安装新版的VC, 新版的MFC代码旧版的VC编译器不一定能支持. 尤其是笑蔽晌IO stream库之类的旧版没有用模板的.
你的函数写得不太对蚂颤啊,没听说CString有FindString()但是有find。。。。
可能的闷穗败情况就是,你可能自己实现了CString,但是你没有把自己族卜实现的文件include进来。
同上..在毕衫盯D:\程序制作\Ex_Ctrls1\这个文件夹里面搜索一下CString和CScrollBar吧..然后把.h包含一下..没搜到手和就塌巧说明你下的源码不完整..
你百度搜 VS2005啊 2008 啊 这些都是新的