Cview,Frame,Doc,APP等的调用顺序

下面是打开后什么也不做,关闭的

CWinApp::CWinApp()  
  CWinApp::InitApplication()  
  CWinApp::InitInstance()  
  CDocument::CDocument()  
  CFrameWnd::CFrameWnd()  
  CFrameWnd::LoadFrame(nIDResource,   dwDefaultStyle,   pParentWnd,   pContext)  
  CFrameWnd::PreCreateWindow(CREATESTRUCT&   cs)  
  CFrameWnd::Create(lpszClassName,   lpszWindowName,   dwStyle,   rect,   pParentWnd,   lpszMenuName,   dwExStyle,   pContext)  
  CFrameWnd::PreCreateWindow(CREATESTRUCT&   cs)  
  CFrameWnd::OnCreate(LPCREATESTRUCT   lpCreateStruct)  
  CFrameWnd::OnCreateClient(lpcs,   pContext)  
  CView::CView()nCView::Create(lpszClassName,   lpszWindowName,   dwStyle,   rect,   pParentWnd,   nID,   pContext)  
  CView::PreCreateWindow(cs)  
  CDocument::SetTitle(lpszTitle)  
  CDocument::OnNewDocument()  
  CDocument::DeleteContents()  
  CView::OnInitialUpdate()  
  CView::OnUpdate(CView*   /*pSender*/,   LPARAM   /*lHint*/,   CObject*   /*pHint*/)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CFrameWnd::ActivateFrame(nCmdShow)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CWinApp::Run()  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CDocument::OnCloseDocument()  
  CFrameWnd::DestroyWindow()  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::PostNcDestroy()  
  CView::~CView()  
  CFrameWnd::PostNcDestroy()  
  CFrameWnd::~CFrameWnd()  
  CDocument::DeleteContents()  
  CWinApp::ExitInstance()   

下面这个是打开后又打开文件、保存的

CWinApp::CWinApp()  
  CWinApp::InitApplication()  
  CWinApp::InitInstance()  
  CDocument::CDocument()  
  CFrameWnd::CFrameWnd()  
  CFrameWnd::LoadFrame(nIDResource,   dwDefaultStyle,   pParentWnd,   pContext)  
  CFrameWnd::PreCreateWindow(CREATESTRUCT&   cs)  
  CFrameWnd::Create(lpszClassName,   lpszWindowName,   dwStyle,   rect,   pParentWnd,   lpszMenuName,   dwExStyle,   pContext)  
  CFrameWnd::PreCreateWindow(CREATESTRUCT&   cs)  
  CFrameWnd::OnCreate(LPCREATESTRUCT   lpCreateStruct)  
  CFrameWnd::OnCreateClient(lpcs,   pContext)  
  CView::CView()  
  CView::Create(lpszClassName,   lpszWindowName,   dwStyle,   rect,   pParentWnd,   nID,   pContext)  
  CView::PreCreateWindow(cs)  
  CDocument::SetTitle(lpszTitle)  
  CDocument::OnNewDocument()  
  CDocument::DeleteContents()  
  CView::OnInitialUpdate()  
  CView::OnUpdate(CView*   /*pSender*/,   LPARAM   /*lHint*/,   CObject*   /*pHint*/)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CFrameWnd::ActivateFrame(nCmdShow)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CWinApp::Run()  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CWinApp::OpenDocumentFile(lpszFileName)  
  CDocument::OnOpenDocument(lpszPathName)  
  CDocument::DeleteContents()  
  CDocument::Serialize(CArchive&   ar)  
  CDocument::SetPathName(lpszPathName,   bAddToMRU)  
  CDocument::SetTitle(lpszTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CView::OnInitialUpdate()  
  CView::OnUpdate(CView*   /*pSender*/,   LPARAM   /*lHint*/,   CObject*   /*pHint*/)  
  CFrameWnd::ActivateFrame(nCmdShow)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CWinApp::OpenDocumentFile(lpszFileName)  
  CDocument::OnOpenDocument(lpszPathName)  
  CDocument::DeleteContents()  
  CDocument::Serialize(CArchive&   ar)  
  CDocument::SetPathName(lpszPathName,   bAddToMRU)  
  CDocument::SetTitle(lpszTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CView::OnInitialUpdate()  
  CView::OnUpdate(CView*   /*pSender*/,   LPARAM   /*lHint*/,   CObject*   /*pHint*/)  
  CFrameWnd::ActivateFrame(nCmdShow)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CDocument::OnSaveDocument(lpszPathName)  
  CDocument::Serialize(CArchive&   ar)  
  CDocument::SetPathName(lpszPathName,   bAddToMRU)  
  CDocument::SetTitle(lpszTitle)  
  CFrameWnd::OnUpdateFrameTitle(bAddToTitle)  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::OnActivateFrame(nState,   pDeactivateFrame)  
  CDocument::OnCloseDocument()  
  CFrameWnd::DestroyWindow()  
  CView::OnActivateView(bActivate,   pActivateView,   pDeactiveView)  
  CView::PostNcDestroy()  
  CView::~CView()  
  CFrameWnd::PostNcDestroy()  
  CFrameWnd::~CFrameWnd()  
  CDocument::DeleteContents()  
  CWinApp::ExitInstance()
 

你可能感兴趣的:(Cview,Frame,Doc,APP等的调用顺序)