Comment by sys_64738

15 days ago

I've not done MFC Win32 programming since 1999 but if I recall those programs don't execute the main() function. They instantiate the Win32 class for your app or something like that. I can't remember any details anymore.

You still have a main function in Win32, it's just called WinMain and has a slightly different signature.

MFC has CWinApp, which you'd normally subclass, and a stock WinMain implementation that instantiates that, but it's not strictly necessary to subclass it, just convenient.

They don't use main because they use WinMain, which is the entry point for Windows apps that don't run in a console window.

WinMain should create an instance of the app class and call Run.

"You're posting too fast." I never got that before. How fast is too fast? I tried to post this comment hours ago, but I couldn't. I guess I've been restricted because of this comment https://news.ycombinator.com/item?id=47473604 which feels pretty unfair