我使用类向导向工程里添加一个从CTreeView继承的CDBTreeView类
添加完成以后编译老是出这样的问题!急求答案
这里的CTreeView怎么会没定义呢?晕了一个早上了,还没吃饭!
--------------------Configuration: Auto863 - Win32 Debug--------------------
Compiling...
DBTreeView.cpp
f:\project\auto863\dbtreeview.h(14) : error C2504: 'CTreeView' : base class undefined
F:\Project\Auto863\DBTreeView.cpp(17) : error C2440: 'return' : cannot convert from 'class CDBTreeView *' to 'class CObject *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
F:\Project\Auto863\DBTreeView.cpp(17) : error C2653: 'CTreeView' : is not a class or namespace name
F:\Project\Auto863\DBTreeView.cpp(17) : error C2065: 'classCTreeView' : undeclared identifier
F:\Project\Auto863\DBTreeView.cpp(28) : error C2653: 'CTreeView' : is not a class or namespace name
F:\Project\Auto863\DBTreeView.cpp(39) : error C2065: 'GetDocument' : undeclared identifier
F:\Project\Auto863\DBTreeView.cpp(39) : error C2440: 'initializing' : cannot convert from 'int' to 'class CDocument *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
F:\Project\Auto863\DBTreeView.cpp(49) : error C2653: 'CTreeView' : is not a class or namespace name
F:\Project\Auto863\DBTreeView.cpp(54) : error C2653: 'CTreeView' : is not a class or namespace name
Error executing cl.exe.Auto863.exe - 9 error(s), 0 warning(s)
添加完成以后编译老是出这样的问题!急求答案
这里的CTreeView怎么会没定义呢?晕了一个早上了,还没吃饭!
--------------------Configuration: Auto863 - Win32 Debug--------------------
Compiling...
DBTreeView.cpp
f:\project\auto863\dbtreeview.h(14) : error C2504: 'CTreeView' : base class undefined
F:\Project\Auto863\DBTreeView.cpp(17) : error C2440: 'return' : cannot convert from 'class CDBTreeView *' to 'class CObject *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
F:\Project\Auto863\DBTreeView.cpp(17) : error C2653: 'CTreeView' : is not a class or namespace name
F:\Project\Auto863\DBTreeView.cpp(17) : error C2065: 'classCTreeView' : undeclared identifier
F:\Project\Auto863\DBTreeView.cpp(28) : error C2653: 'CTreeView' : is not a class or namespace name
F:\Project\Auto863\DBTreeView.cpp(39) : error C2065: 'GetDocument' : undeclared identifier
F:\Project\Auto863\DBTreeView.cpp(39) : error C2440: 'initializing' : cannot convert from 'int' to 'class CDocument *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
F:\Project\Auto863\DBTreeView.cpp(49) : error C2653: 'CTreeView' : is not a class or namespace name
F:\Project\Auto863\DBTreeView.cpp(54) : error C2653: 'CTreeView' : is not a class or namespace name
Error executing cl.exe.Auto863.exe - 9 error(s), 0 warning(s)
解决方案 »
- CToolBar如何创建CMFCMenuBar这种工具栏
- 【VC图形化编程】如何编制一个利用下拉框,自动填充文本框ComboBox?
- 怎样 获取/设置 GroupBox 标题文本的字体颜色?
- 初学c++,请问下面语句什么意思?
- RegEnumValue和reg_binary的问题
- 定时器问题!!
- GetOpenFileName()问题,如何设定默认显示方式
- 知道bitmap路径名,怎样载入啊,用LoadBitmap?谢谢
- 如何让你一个控件全屏?
- MFC怎样实现多个图片和文字展示的效果?
- 如何把一个小的.bmp 图片作成toolbar上的按钮
- 如何实现如MSN Messenger设定对话框中那样的Tab排序
#include <Afxcview.h>
#include "StdAfx.h"
然后在你的派生类中加 #include "StdAfx.h".
呵呵