AfxGetMainWnd() returns NULL

  • Thread starter Thread starter sgrm123
  • Start date Start date
S

sgrm123

Guest
Hi,

My application is MFC MDI application.

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIFrameWndEx::OnCreate(lpCreateStruct) == -1)
return -1;

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

Why AfxGetMainWnd() returns NULL in my application

Continue reading...
 
Back
Top