开发者

How to change entry point to _tmain() for MFC Application

How do I change the entry Point of my MFC App开发者_JAVA技巧lication ? Standard is InitInstance() of the class that extends CWinApp. But I need the entry Point at _tmain(). Will call initInstance() from there...


You can set entry point of application by specifying linker option "/entry:myMain" or via pragma directive:

#pragma comment(linker, "/entry:myMain")


See the official /Entry documentation for VC++ 2010 for how to set it and what the defaults are. Note that main() and InitInstance() may be the entry point for your code but it not necessarily the original entry point for the program. For example, trace into a MFC program and you'll see a large amount of initialization code that you probably don't want to skip.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜