MFC应用程序类 [英] MFC Application class

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

问题描述

朋友,

我想知道为什么应用程序类在MFC中只包含一个对象.请告诉我.

谢谢&问候
Sairam

Hi friends,

I want to know why does an application class contain only one object in MFC. Plz tell me.

Thanks & Regards
Sairam

推荐答案

因为您的应用程序中只有一个应用程序... [rolleyes]

Because there is only one application in your application... [rolleyes]


在可执行文件中,必须有一个可以由加载程序,运行时等调用的入口点.
这里不能有任何歧义.

这就是为什么我们只能有一个<控制台程序中的c0>函数,而Windows程序中只有一个WinMain函数.这就是为什么我们只能有一个CWinAppCWinAppEx实例的原因'',因为此类封装了可执行文件的入口点.

In an executable, there must be one entry point that can be called by the loader, runtime etc.
There cannot be any ambiguity here.

That is why we can have only one main function in a console program and only one WinMain function in a windows program. And that is exactly why we can have only one CWinApp or CWinAppEx instance ''cause this class encapsulates the entry point for the executable.


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

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