From 7a2d9d0d1021ea9a315bb78c845bebb2624ea773 Mon Sep 17 00:00:00 2001 From: exprosic Date: Mon, 18 Mar 2019 01:26:35 +0100 Subject: [PATCH] Fix compilation of MFC support code in MSVS conformance mode Allow the code to be compilable with /permissive-, which is on by default in VS2017. Closes https://github.com/wxWidgets/wxWidgets/pull/1263 --- include/wx/msw/mfc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/wx/msw/mfc.h b/include/wx/msw/mfc.h index f670b1b843..39c9ed4693 100644 --- a/include/wx/msw/mfc.h +++ b/include/wx/msw/mfc.h @@ -66,7 +66,7 @@ public: if ( !BaseApp::InitInstance() ) return FALSE; - if ( !wxEntryStart(m_hInstance) ) + if ( !wxEntryStart(BaseApp::m_hInstance) ) return FALSE; if ( !wxTheApp || !wxTheApp->CallOnInit() ) @@ -80,8 +80,8 @@ public: int ExitInstance() wxOVERRIDE { - delete m_pMainWnd; - m_pMainWnd = NULL; + delete BaseApp::m_pMainWnd; + BaseApp::m_pMainWnd = NULL; if ( wxTheApp ) wxTheApp->OnExit(); @@ -137,7 +137,7 @@ protected: // We need to initialize the main window to let the program continue // running. - m_pMainWnd = new wxMFCWnd(w); + BaseApp::m_pMainWnd = new wxMFCWnd(w); // We also need to reset m_pMainWnd when this window will be destroyed // to prevent MFC from using an invalid HWND, which is probably not @@ -157,8 +157,8 @@ private: { event.Skip(); - delete m_pMainWnd; - m_pMainWnd = NULL; + delete BaseApp::m_pMainWnd; + BaseApp::m_pMainWnd = NULL; } };