Cant create a new object to a window

I am a beginner in MFC programming and I am trying to learn basic elements when I go to override InitInstance from CWinApp to create a new object window I get error codes saying that my object is undefined
1
2
3
4
5
6
7
BOOL InitInstance(){
	m_pMainWindow = new CMainWindow;//Error m_pMainWindow is undefined

	m_pMainWnd->ShowWindow(m_nCmdShow);
	 m_pMainWnd->UpdateWindow();
	 return TRUE;
}

How do I specify that this is a Window object or how do I make this code work the way it is?


Nvm found the problem
Last edited on
Topic archived. No new replies allowed.