Article Directory
What is the MFC framework program?
MFC framework program
The MFC framework program is a Windows application program generated using the MFC AppWizard.
MFC AppWizard is a wizard tool that assists us in generating source code. It can help us automatically generate source code based on the MFC framework. In each step of the wizard, we can choose various features according to our needs, so as to realize customized applications.
How to create a new MFC program
A Preliminary Study of MFC Single Document Interface Program
Analysis of MFC framework program (operation context)
Windows API program review
MFC framework
Compared with Windows API programs, MFC programs have no execution path, no organization, and no idea how to process messages.
MFC program output HelloWorld
MFC put the source code package in the VC installation directory
Profiling
- TheApp, the global object in MFC
Initialize the CTestAPP object, obtain the configuration of the application memory and call the base class CWinApp constructor (AppCore.cpp in the file of the MFC source directory) for some initialization work when the program runs.
note: Since theApp is a global object, the CWinApp constructor will run before the entry function WinMain.
- WinMain function in MFC
(2) AfxWinMain function
- CTestApp :: InitInstance () function
- CFrameWnd :: LoadFrame function
- CWnd::CreateEx