//메인프레임 포인터얻기

CMainFrame * pFrame = reinterpret_cast<CMainFrame*>(AfxGetApp()->GetMainWnd());

//View포인터
 (CTestView *)pFrame->GetActiveView();

//Doc포인터
CTestDoc  m_pDocument = reinterpret_cast<CTestDoc *>(pFrame->GetActiveDocument());

 

//가끔 NULL 나와서 다운됨  (사용X)

( CMainFrame * pFrame = (CMainFrame*)AfxGetMainWnd(); )

 

 

//참고 : https://six605.tistory.com/261

+ Recent posts