CWinThread::GetMainWnd

This method retrieves a pointer to the active main window of the application, instead of directly referring to the m_pMainWnd data member of the application object, if your application is an ActiveX server. For user-interface threads, this is equivalent to directly referring to the m_pActiveWnd data member of your application object.

If your application is not an ActiveX server, then calling this method is equivalent to directly referring to the m_pMainWnd data member of your application object.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

virtual CWnd * GetMainWnd( );