// 다이얼로그 포인트 얻어 오기
CABCDialog *pdlgMain = (CABCDialog*) AfxGetMainWnd();
// 뷰나 도큐먼트의 포인트 얻어 오기
CMainWnd* pMain=(CMainWnd*)AfxGetMainWnd();
pMain->GetActiveDocument();
pMain->GetActiveView();
// 다이얼로그에서 다큐먼트 변수 읽어 올때.
pDoc = ((CMainFrame *)AfxGetApp()->GetMainWnd())->GetActiveDocument();
CMainFrame *pFrm = (CMainFrame *)AfxGetMainWnd();
CBasketBallEditView *pView = (CBasketBallEditView *)pFrm->GetActiveView();
// CTestApp에서
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
CTestDoc* pDoc = (CTestDoc*)((CMainFrame*)AfxGetMainWnd())->GetActiveDocument();
CTestView* pView = (CTestView*)((CMainFrame*)AfxGetMainWnd())->GetActiveView();
// CMainFrame에서
CTestApp* pApp = (CTestApp*)AfxGetApp();
CTestDoc* pDoc = (CTestDoc*)GetActiveDocument();
CTestView* pView = (CTestView*)GetActiveView();
// CTestDoc에서
CTestApp* pApp = (CTestApp*)AfxGetApp();
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
CTestView* pView = (CTestView*)((CMainFrame*)AfxGetMainWnd())->GetActiveView();
// CTestView에서
CTestApp* pApp = (CTestApp*)AfxGetApp();
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
or (CMainFrame*)GetParent();
CTestDoc* pDoc = (CTestDoc*)((CMainFrame*)AfxGetMainWnd())->GetActiveDocument();
or (CTestDoc*)GetDocument();
comments:
댓글 쓰기