★★★菜鸟系列:CWND没有CRunTimeclass吗?★★★
这是类关系:
class CChildView : public CWnd
{
// Construction
public:
CChildView();
protected:
DECLARE_DYNCREATE(CChildView)
...
这是编译信息:
--------------------Configuration: MyTools - Win32 UniCode--------------------
Compiling...
ChildView.cpp
MainFrm.cpp
MyTools.cpp
Generating Code...
Linking...
ChildView.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CChildView::GetRuntimeClass(void)const " (?GetRuntimeClass@CChildView@@UBEPAUCRuntimeClass@@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CMainFrame::GetRuntimeClass(void)" (?GetRuntimeClass@CMainFrame@@UAEPAUCRuntimeClass@@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CChildView::classCChildView" (?classCChildView@CChildView@@2UCRuntimeClass@@B)
../Exe/MyTools.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
Creating browse info file...
MyTools.exe - 4 error(s), 0 warning(s)
不懂,不明白.我看CWND有CRunTimeClass啊.
问题点数:100、回复次数:4Top
1 楼mahongxi(烤鸡翅膀)(色摸)回复于 2002-03-25 12:51:44 得分 0
有的,凡是从CCmdTarget派生出来的类别,都支持RTTI,也就是会有一个
CRuntimeClass的结构。
CObject->CCmdTarget->CWnd
你看你的执行文件[CPP]中是否有:
IMPLEMENT_DYNCREATE(CChildView,CWnd)
Top
2 楼mahongxi(烤鸡翅膀)(色摸)回复于 2002-03-25 12:53:44 得分 90
我现在在线QQ:55669753Top
3 楼partime(partime)回复于 2002-03-25 12:58:37 得分 10
没有IMPLEMENT_DYNCREATE?Top
4 楼DCom(VC程序员)回复于 2002-03-25 12:58:56 得分 0
问题解决.马上给分.
Top




