MFC 애플리케이션 함수 호출 순서
- Module/WindowsMFC
- 2009. 11. 24.
WinMainCRTStartup -> CWinApp::CWinApp -> CMyApp::CMyApp @
-> WinMain -> ::AfxWinMain -> ::AfxGetApp @
-> ::AfxWinInit -> ::AfxInitThread @
-> CWinApp::InitApplication @
-> CWinApp::InitInstance -> CSingleDocTemplate::CSingleDocTemplate @
-> CWinApp::AddDocTemplate @
-> CWinApp::ParseCommandLine @
-> CWinApp::ProcessShellCommand -> CWinApp::OnFileNew -> CDocTemplate::OpenDocumentFile ①
-> CWinApp::Run ⑦
-> CWinApp::ExitInstance @
-> ::AfxWinTerm @
-> CWinApp::~CWinApp -> CMyApp::~CMyApp @
① CSingleDocTemplate::OpenDocumentFile -> CDocTemplate::CreateNewDocument -> CDocument::CDocument @
-> CDocTemplate::CreateNewFrame -> CFrameWnd::CFrameWnd -> CMainFrame::CMainFrame @
-> CWnd::Create ②
-> CDocument::OnNewDocument ⑥
-> CFrameWnd::InitialUpdateFrame @
② CFrameWnd::Create -> CFrameWnd::PreCreateWindow -> CMainFrame::PreCreateWindow @
↘
③ : WM_CREATE
③ CMainFrame::OnCreate -> CFrameWnd::OnCreateClient -> CFrameWnd::CreateView -> CView::CView -> CMyView::CMyView @
-> CWnd::Create ④
④ CView::Create -> CView::PreCreateWindow -> CMyView::PreCreateWindow @
↘
⑤ : WM_CREATE
⑤ CMyView::OnCreate @
⑥ CMyDoc::OnNewDocument @
⑦ CWinApp::Run -> CWinThread::Run -> CWinThread::PumpMessage ↘
⑧ : 루프
-> CWinThread::OnIdle ↗
⑧ CWnd::WindowProc -> CCmdTarget::OnCmdMsg @
↘
WM_SYSCOMMAND => CWnd::OnSysCommand -> ⑨ : WM_CLOSE
⑨ CFrameWnd::OnClose -> CWndDestroyWindow -> ⑩ : WM_DESTROY -> ⑫ : 객체 소멸
↘ ⑪ : WM_NCDESTROY ↗
⑩ CWnd::OnDestroy @
⑪ CWnd::OnNcDestroy @
⑫ CView::~CView -> CFrameWnd::~CFrameWnd -> CDocument::~CDocument -> CSingleDocTemplate::~CSingleDocTemplate @
::AfxWinMain -> ::AfxGetApp @
-> ::AfxWinInit -> ::AfxInitThread @
-> CWinApp::InitApplication @
-> CWinApp::InitInstance -> CSingleDocTemplate::CSingleDocTemplate @
-> CWinApp::AddDocTemplate @
-> CWinApp::ParseCommandLine @
-> CWinApp::ProcessShellCommand -> CWinApp::OnFileNew -> CDocTemplate::OpenDocumentFile ①을 수행
-> CWinApp::Run 을 수행
-> CWinApp::ExitInstance @
-> ::AfxWinTerm @
-> CWinApp::~CWinApp -> CMFCAppApp::~CmfcAppApp @
'Module > WindowsMFC' 카테고리의 다른 글
MFC How To (0) | 2010.01.23 |
---|---|
MFC MDI 타이틀 제목 하나로 통합하기 (0) | 2009.11.24 |
메모리 맵 파일(Memory Map File) (0) | 2009.11.03 |
MFC 다이얼로그 메모리 해제 (0) | 2009.08.25 |
MFC - 다이얼로그 생성시 발생되는 메세지들... (0) | 2009.08.07 |