📄 subject_56699.htm
字号:
<p>
序号:56699 发表者:丁丁当当 发表日期:2003-10-20 11:02:26
<br>主题:DEClARE_SERIAL是什么意思
<br>内容:我的:<BR>class CShape : public CObject<BR>{<BR>// DEClARE_SERIAL(CShape)<BR>public:<BR> CShape();<BR>// DEClARE_SERIAL(CShape)<BR> virtual ~CShape();<BR><BR>};<BR><BR>放在那两个地方都说少分号,可系统自己生成的类中都是这样的呀,例如:<BR>class CChildFrame : public CMDIChildWnd<BR>{<BR> DECLARE_DYNCREATE(CChildFrame)<BR>public:<BR> CChildFrame();<BR>...<BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:tiger_bai 回复日期:2003-10-20 11:29:16
<br>内容:在.CPP文件中加入include "stdafx.h"<BR><BR>#include "MyClass.h"<BR><BR>IMPLEMENT_SERIAL( CMyClass, CObject, VERSIONABLE_SCHEMA | 2 )<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:丁丁当当 回复日期:2003-10-20 16:33:14
<br>内容: <BR>还是不行,好多错误:<BR> error C2143: syntax error : missing ';' before 'public'<BR> error C2039: 'CreateObject' : is not a member of 'CShape'<BR> see declaration of 'CShape'<BR> error C2509: '_GetBaseClass' : member function not declared in 'CShape'<BR> see declaration of 'CShape'<BR> error C2039: 'classCShape' : is not a member of 'CShape'<BR> see declaration of 'CShape'<BR> error C2039: 'CreateObject' : is not a member of 'CShape'<BR> see declaration of 'CShape'<BR> error C2509: 'GetRuntimeClass' : member function not declared in 'CShape'<BR> see declaration of 'CShape'<BR> error C2039: 'classCShape' : is not a member of 'CShape'<BR> see declaration of 'CShape'<BR> error C2039: 'classCShape' : is not a member of 'CShape'<BR> see declaration of 'CShape'<BR>Error executing cl.exe.<BR><BR><BR><BR><BR><BR>其中的 public CObject 是我自己加的,不是用向导生成的,问题会不会出在这里呢?<BR><BR>可是添加新类的向导的基类选项中没有CObject呀?<BR><BR><BR>2003-10-20 16:42:42
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -