如何在MFC doc/view应用程序中序列化对话框数据? [英] How to serialize dialog data in MFC doc/view application ?

查看:150
本文介绍了如何在MFC doc/view应用程序中序列化对话框数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其中有一个带有音频滑块的对话框.单击对话框上的确定"按钮时,将存储滑块值(在Doc变量中).然后,我尝试进行序列化,但是当我保存文档然后打开它时,值不存在.我正在使用doc/view拱门,是否有人有类似的示例或教程?在此先感谢.

I have a project that has a dialog box with audio sliders on it. When the ok button on the dialog is clicked the slider values are stored (in Doc variables). I tried to serialize then but when I save a document then open it the values are not there. I am using the doc/view arch does anyone have an example or tutorial that does something similar? Thanks in advance.

推荐答案

很可能没有在文档中设置这些值.您是否进行了调试以找出答案?

您如何将要序列化的文档实例传递到对话框?而且,如果您遵循doc/view架构,则通常不应序列化(保存)文档,这通常是显式的用户操作.只需将文档标记为脏文件即可.
Most likely the values weren''t set in the document. Did you debug to find out?

How are you passing the instance of the document you want serialized to the dialog? And if you''re following the doc/view architecture you generaly shouldn''t serialize (save) the document which is generally an explicit user action. Just mark the document as dirty.


这篇关于如何在MFC doc/view应用程序中序列化对话框数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆