X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8df85a612341f176f06317d2867c502f282e7185..1f7fd1a500e15c05b76779c424373c6fcdc1cb06:/src/os2/app.cpp diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 5b4045dd7a..4e41b7077f 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -93,12 +93,6 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL; HBRUSH wxDisableButtonBrush = (HBRUSH) 0; -MRESULT EXPENTRY wxWndProc( HWND - ,ULONG - ,MPARAM - ,MPARAM - ); - // =========================================================================== // implementation // =========================================================================== @@ -386,6 +380,10 @@ void wxApp::CleanUp() wxClassInfo::CleanUpClasses(); + // Delete Message queue + if (wxTheApp->m_hMq) + ::WinDestroyMsgQueue(wxTheApp->m_hMq); + delete wxTheApp; wxTheApp = NULL; @@ -522,6 +520,7 @@ wxApp::wxApp() m_nPrintMode = wxPRINT_WINDOWS; m_exitOnFrameDelete = TRUE; m_bAuto3D = TRUE; + m_hMq = 0; } // end of wxApp::wxApp wxApp::~wxApp() @@ -529,6 +528,7 @@ wxApp::~wxApp() // // Delete command-line args // +#if wxUSE_UNICODE int i; for (i = 0; i < argc; i++) @@ -553,8 +553,9 @@ bool wxApp::Initialized() // bool wxApp::DoMessage() { - BOOL bRc = ::WinGetMsg(vHabmain, &m_vMsg, HWND(NULL), 0, 0); + BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0); + wxUsleep(1000); if (bRc == 0) { // got WM_QUIT @@ -623,7 +624,7 @@ bool wxApp::DoMessage() #endif // wxUSE_THREADS // Process the message - if (!ProcessMessage((WXMSG *)&svCurrentMsg) ) + if (!ProcessMessage((WXMSG *)&svCurrentMsg)) { ::WinDispatchMsg(vHabmain, (PQMSG)&svCurrentMsg); } @@ -657,6 +658,7 @@ int wxApp::MainLoop() #endif // wxUSE_THREADS while (!Pending() && ProcessIdle()) { +// wxUsleep(10000); } DoMessage(); } @@ -884,7 +886,7 @@ void wxExit() wxLogError(_("Fatal error: exiting")); wxApp::CleanUp(); -} // end of wxExit +} // end of wxExit // // Yield to incoming messages @@ -893,7 +895,7 @@ bool wxYield() { HAB vHab = 0; QMSG vMsg; - + // // Disable log flushing from here because a call to wxYield() shouldn't // normally result in message boxes popping up &c @@ -976,13 +978,15 @@ void wxWakeUpIdle() } } // end of wxWakeUpIdle -HINSTANCE wxGetInstance() +HAB wxGetInstance() { - return wxhInstance; + return vHabmain; } -void wxSetInstance(HINSTANCE hInst) +void wxSetInstance( + HAB vHab +) { - wxhInstance = hInst; + vHabmain = vHab; }