SDI 串行化有关问题
SDI 串行化问题
我创建了一个基于SDI 的MFC 项目,进行串行化操作!
在SDI的CMainFrame 上有个停靠窗体(CMainFrame的成员对象a),用来数据显示的,不进行交互!
通过串行化保存后,如果在打开这个串行化文件的时候通过a窗体将数据显示出来?
------解决方案--------------------
Serialization: Making a Serializable Class
Five main steps are required to make a class serializable. They are listed below and explained in the following sections:
1. Deriving your class from CObject (or from some class derived from CObject).
2. Overriding the Serialize member function.
3. Using the DECLARE_SERIAL macro in the class declaration.
4. Defining a constructor that takes no arguments.
5. Using the IMPLEMENT_SERIAL macro in the implementation file for your class.
If you call Serialize directly rather than through the >> and << operators of CArchive, the last three steps are not required for serialization.
------解决方案--------------------
http://fpcfjf.blog.163.com/blog/static/55469793200991311019811/
------解决方案--------------------
您好
我是本版版主
此帖已多日无人关注
请您及时结帖
如您认为问题没有解决可按无满意结帖处理
另外本版设置了疑难问题汇总帖
并已在版面置顶
相关规定其帖子中有说明
您可以根据规定提交您帖子的链接
如您目前不想结帖只需回帖说明
我们会删除此结帖通知
见此回复三日内无回应
我们将强制结帖
相关规定详见界面界面版关于版主结帖工作的具体办法
我创建了一个基于SDI 的MFC 项目,进行串行化操作!
在SDI的CMainFrame 上有个停靠窗体(CMainFrame的成员对象a),用来数据显示的,不进行交互!
通过串行化保存后,如果在打开这个串行化文件的时候通过a窗体将数据显示出来?
------解决方案--------------------
Serialization: Making a Serializable Class
Five main steps are required to make a class serializable. They are listed below and explained in the following sections:
1. Deriving your class from CObject (or from some class derived from CObject).
2. Overriding the Serialize member function.
3. Using the DECLARE_SERIAL macro in the class declaration.
4. Defining a constructor that takes no arguments.
5. Using the IMPLEMENT_SERIAL macro in the implementation file for your class.
If you call Serialize directly rather than through the >> and << operators of CArchive, the last three steps are not required for serialization.
------解决方案--------------------
http://fpcfjf.blog.163.com/blog/static/55469793200991311019811/
------解决方案--------------------
您好
我是本版版主
此帖已多日无人关注
请您及时结帖
如您认为问题没有解决可按无满意结帖处理
另外本版设置了疑难问题汇总帖
并已在版面置顶
相关规定其帖子中有说明
您可以根据规定提交您帖子的链接
如您目前不想结帖只需回帖说明
我们会删除此结帖通知
见此回复三日内无回应
我们将强制结帖
相关规定详见界面界面版关于版主结帖工作的具体办法