|
|
От: | MicVit | |
| Дата: | 22.09.04 13:27 | ||
| Оценка: | |||
CWnd* CWinThread::GetMainWnd()
{
if (m_pActiveWnd != NULL)
return m_pActiveWnd; // probably in-place active
// when not inplace active, just return main window
if (m_pMainWnd != NULL)
return m_pMainWnd;
return CWnd::GetActiveWindow();
}If your application is an OLE server, call this 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.