]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/app.cpp
Committing in .
[wxWidgets.git] / src / os2 / app.cpp
index 392bb8489d87c0669100da3f98cf273dfd370878..26611eed61698e7b7d90383a40518092070abf19 100644 (file)
@@ -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()
@@ -554,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(10000);
     if (bRc == 0)
     {
         // got WM_QUIT
@@ -624,7 +624,7 @@ bool wxApp::DoMessage()
 #endif // wxUSE_THREADS
 
         // Process the message
-        if (!ProcessMessage((WXMSG *)&svCurrentMsg) )
+        if (!ProcessMessage((WXMSG *)&svCurrentMsg))
         {
             ::WinDispatchMsg(vHabmain, (PQMSG)&svCurrentMsg);
         }
@@ -658,6 +658,7 @@ int wxApp::MainLoop()
 #endif // wxUSE_THREADS
         while (!Pending() && ProcessIdle())
         {
+         wxUsleep(10000);
         }
         DoMessage();
     }