Make more use of theApp.m_pMainWnd