CWinThread::GetMainWnd

Call this member function to retrieve a pointer to the active main window of the application, instead of directly referring to the m_pMainWnd 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 member of your application object.

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

Syntax

virtual CWnd * GetMainWnd( );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CWinThread Overview, CWinThread Member Functions, Application Architecture Classes