SDI 형태
1. MainFrame 얻기
– CMainFrame* pFrm = (CMainFrame *)AfxGetMainWnd();
2. APP 얻기
– CExamApp* pApp = (CExamApp *)AfxGetApp();
3. Document 얻기
– CMainFrame* pFrm = (CMainFrame *)AfxGetMainWnd();
–C00Doc* pDoc = (C00Doc *)pFrm->GetActiveDocument();
4. View 얻기
– CMainFrame* pFrm = (CMainFrame *)AfxGetMainWnd();
–C00View* pView = (C00View *)pFrm->GetActiveView();
MDI 형태
1. ChildFrame 얻기
– CMainFrame* pFrm = (CMainFrame *)AfxGetMainWnd();
–CChildFrame* pCHild = (CChildFrame *)pFrm->GetActiveFrame();
2. Document 얻기
– CMainFrame* pFrm = (CMainFrame *)AfxGetMainWnd();
–CCHildFrame* pChild = (CChildFrame *)pFrm->GetActiveFrame();
–C00Doc* pDoc = (C00Doc *)pChild->GetActiveDocument();
3. View 얻기
– CMainFrame* pFrm = (CMainFrame *)AfxGetMainWnd();
–CChildFrame* pChild = (CChildFrame *)pFrm->GetActiveFrame();
–C00View* pView = (C00View *)pChild->GetActiveView();