MFC直接打开文件 [英] mfc open document directly

查看:198
本文介绍了MFC直接打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个mfc程序,该程序将一些类序列化并以二进制格式构造为文件
现在,我已经选择了Windows中的(打开方式)以打开我的mfc程序,当我双击保存的文件时,mfc程序将打开,但是序列化的数据不会被初始化.
当我用我的mfc程序的打开按钮将其序列化后,序列化成功完成了.保存的数据被初始化.
请通过双击保存的文件来帮助初始化保存的文件中的数据
就像当我们打开ms office的.doc文件时一样
谢谢

i have made an mfc program which serializes some classes and strucure to a file in binary format
now i have selected the (open with) in windows to open my mfc program, when i double click the saved file the mfc program is opened but the serialized data is not inisialised
the serialisation was sucessfull as when i open it with the open button of my mfc program which serializes it back the saved data is initialized.
plz help on initialising the data from saved file by double clicking on the saved file
like when we open a .doc file of ms office
thank you

推荐答案

双击保存的文件,就像打开ms office的.doc文件一样

您所说的称为文件关联,它将特定文件扩展名与应用程序相关联,以便双击其中一个文件即可打开该应用程序.

这里有一篇文章可以帮助您入门:将文件扩展名与Shell OPEN命令和应用程序关联 [ ^ ]
double clicking on the saved file like when we open a .doc file of ms office

What you are talking about is called file associations, which associate a particular file extension with an application, so that double-clicking one of these files opens the application.

There is an article here that will help get you started: Associate File Extension with Shell OPEN command and Application[^]


这篇关于MFC直接打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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