Migrating the WinMain Function

MFC supplies its own WinMain function, so you don't need to supply one (it's possible to supply one and cause it to override MFC's WinMain if you really need to). This function, which you'll seldom need to worry about, registers a number of standard window classes and calls functions to initialize the application, run its message loop, and clean up after the application. MFC WinMain does most of what you'll normally need, and it allows you to customize its actions by inserting your own code into its initialization, idle processing, and cleanup routines.

Migrating WinMain involves rescuing any special code from the body of WinMain and fixing differences between C and C++ in your files.