MFC:
CObject:CCmdTarget、CDC、CException、CFile、CMenu、CGdiObject
CCmdTarget:CWinThread、CWnd、CDocument、COleControlContainer
CDC:CClientDC、CPaintDC、CWindowDC、CMetaFileDC
CGdiObject:CBitmap、CBrush、CFont、CPen、CRgn、CPalette
CWinThread:CWinapp
CWnd:CFrameWnd
、
CView
、
CDialog
a
ppmodul.cpp:_tWinMain,AfxWinMain
testapp.cpp:theApp,
构造函数—
>
调取基类的构造函数
CWinApp
—
>appcore.cpp:CWinapp::CWinapp
appmodul.cpp:_tWinMain
入口函数
winman.app:AfxWinMain
入口函数
testapp.cpp:
调用派生类的
InitInstance
初始化实例
wincore.app:AfxEndDeferRegisterClass
注册
winFrm.cpp:CFrameWnd::PreCreateWindow
创建窗口、
CFrameWnd::Create
winocre.app:CreateEx
thrdcore.cpp:CWinThread::Run()
、
CWinThread::PumpMessage()
、
AfxInternalPumpMessage
()
testapp.cpp(theApp->testapp::testapp())-->AppCore.cpp(CWinapp::CWinapp)-->
appmodul.cpp(_tWinMain 入口函数)-->winman.app(AfxWinMain入口函数)-->
testapp.cpp(调用派生类的InitInstance 初始化实例) -->
-WinFrm.cpp(CFrameWnd::LoadFrame)-->wincore.app(AfxEndDeferRegisterClass注册)-->WinFrm.cpp(CFrameWnd::PreCreateWindow创建窗口)-->wincore.app(AfxEndDeferRegisterClass注册)-->
>wincore.app(AfxRegisterWndClass)-->WinFrm.cpp(CFrameWnd::Create)-->wincore.app(CWnd::CreateEx)-->WinFrm.cpp(CFrameWnd::PreCreateWindow)-->wincore.app(CWnd::CreateEx)-->
wincore.app(AfxEndDeferRegisterClass注
册)-->wincore.app(CWnd::CreateEx)-->thrdcore.cpp(CWinThread::Run()、CWinThread::PumpMessage()、AfxInternalPumpMessage())