Ctestapp How to call the WinMain function:
First Call Ctestapp Theapp;
Call Ctestapp constructor again.
Then call the base class of Ctestapp CWinApp constructor (Appcore.cpp, address C:\Program Files\Microsoft Visual Studio 9.0\vc\ce\atlmfc\src\mfc)
CWinApp constructor called the _tWinMain function in Appmodul.cpp, which is too complex to see.
The _tWinMain function calls the Afxwinmain function (the main function) in Winmain.cpp
Afxwinmain calls Pthread->initinstance (), which is a virtual function that calls the Ctestapp::initinstance () function in Test.cpp
This function calls the Afxenddeferregisterclass function in Wincore.cpp.
CMainFrame in MainFrm.cpp::P Recreatewindow function calls CFrameWnd in Winfrm.cpp::P Recreatewindow function
The Afxdeferregisterclass function in this function is the Afxenddeferregisterclass function.
Winfrm.cpp also calls the CFrameWnd::Create function, which calls the CreateEx function (wincore.cpp)
CreateEx assigning values to window parameters
Cwinthread::run function (thrdcore.cpp) to complete the cyclic dispatch
This class tells the MFC generation mechanism, functions, classes jump to jump to the chaos
MFC: Xinxin Sun Tutorial 3 notes