如何重新启动MFC应用程序 [英] How to restart MFC Application

查看:110
本文介绍了如何重新启动MFC应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想重新启动MFC应用程序以重新加载工具栏和菜单栏.
我可以使用哪个功能来重新启动它.

请帮帮我.
问候,

P/s:在代码项目中有一个与此相关的主题,但我无法理解/

Hi all,

I want to restart my MFC Application to reload toolbar and menubar.
Which function can I use to restart it.

Please help me.
Regards,

P/s: There are a topic in codeproject about this but I can not understand/

推荐答案

为此,可提供的最糟糕的解决方案是重新启动应用程序.这个想法告诉我您很难理解应用程序的生命周期.

不要这样做!

如果菜单和工具栏在运行时进行修改不仅是更健壮的解决方案,而且实现起来也容易得多,实际上是微不足道的.从这里开始: http://msdn.microsoft.com/en-us /library/f9hbax0b(v=vs.80).aspx [ ^ ],
The worst solution one can offer for this purpose is restarting the application. This idea tells me you poorly undestand life cycle of application.

Don''t do it!

Not only modification if menu and toolbar during run-time is much more robust solution, this is much easier to implement, practically trivial. Start from here: http://msdn.microsoft.com/en-us/library/f9hbax0b(v=vs.80).aspx[^], http://msdn.microsoft.com/en-us/library/2601c0kc(v=vs.80).aspx[^].

—SA


这篇关于如何重新启动MFC应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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