在MFC中单击按钮打开文本文件或html文件 [英] Open a text file or html file with a button click in MFC

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

问题描述

你好

i已经使用VS 2012创建了基于对话框的MFC应用程序,并希望打开一个文本文件窗口而无需用户浏览它,就像我们单击它在我的应用程序文本中打开的文件一样单击按钮时必须打开文件。



感谢

hello
i have created dialog based MFC application with VS 2012 and want to open a text file window without the user having to browse it just like when we click a file it opens similarly in my application text file must be open when button is clicked.

thanks

推荐答案

您需要注册您的应用程序Windows Shell,以便特定的文件类型与您的应用程序相关联。请参阅 https://msdn.microsoft.com/en -us / library / windows / desktop / hh127451%28v = vs.85%29.aspx [ ^ ]。
You need to register your application with the Windows Shell so that the specific file types are associated with your application. See https://msdn.microsoft.com/en-us/library/windows/desktop/hh127451%28v=vs.85%29.aspx[^].


这篇关于在MFC中单击按钮打开文本文件或html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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