Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GekkoCube

standard mfc wizard m_pMainWnd?

This topic is 5565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

in a standard mfc app that the appwzard generates, where is m_pMainWnd, declared? I did a "search in files" for this, and it only shows three occurances, (none plcaed by me and other 2 placed there by default). I just dont understand that this (which appears to be a member pointer, is not anywhere i would logically expect to find. in fact, like i just mentioned, its nowhere to be found!

Share this post


Link to post
Share on other sites
Advertisement
well, you could use
AfxGetApp()->m_pMainWnd

or

theApp->m_pMainWnd if you include theApp as an extern in the file you wish to use it in.

Cheers

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by NatasDM
well, you could use
AfxGetApp()->m_pMainWnd

or

theApp->m_pMainWnd if you include theApp as an extern in the file you wish to use it in.

Or
AfxGetMainWnd()

m_pMainWnd is a member of CWinThread. CWinApp is a subclass of CWinThread, and your applicaton class probably inherits from CWinApp.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!