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 @
출처: http://microdev.pe.kr/22
-> 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 @
출처: http://microdev.pe.kr/22
'개발지식창고 > MFC' 카테고리의 다른 글
[MFC]현제 프로그램이 실행되고 있는 디렉토리 구하기 (0) | 2010.09.20 |
---|---|
[소스] 테두리 없고, 크기 조절 가능하며, 움직일 수 있는 투명 다이얼로그 만들기 (0) | 2010.09.20 |
MFC Class reference (0) | 2010.09.20 |
MFC tip or Reference (0) | 2010.09.20 |
OnEraseBkgnd() 배경화면(Image bmp) & 속도향상 (0) | 2010.09.14 |