]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/app.cpp
More compilation fixes.
[wxWidgets.git] / src / os2 / app.cpp
index ff0d9b43ed45c393f2174551fc44c547f6093347..737de733cfca887bff142a9fa0f1d8a4bbdb5b78 100644 (file)
@@ -205,7 +205,7 @@ bool wxApp::RegisterWindowClasses(
                             ,wxFrameClassName
                             ,(PFNWP)wxWndProc
                             ,CS_SIZEREDRAW | CS_SYNCPAINT
-                            ,0
+                            ,sizeof(ULONG)
                            ))
     {
         vError = ::WinGetLastError(vHab);
@@ -321,19 +321,13 @@ void wxApp::CleanUp()
     wxLog::DontCreateOnDemand();
 
     // this will flush the old messages if any
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ < 400))
-    // another VA 3.0 memory problem here
     delete wxLog::SetActiveTarget(new wxLogStderr);
-#endif
 #endif // wxUSE_LOG
 
     // One last chance for pending objects to be cleaned up
     wxTheApp->DeletePendingObjects();
 
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ < 400))
-    // another VA 3.0 memory problem here
     wxModule::CleanUpModules();
-#endif
 
 #if wxUSE_WX_RESOURCES
     wxCleanUpResourceSystem();
@@ -345,10 +339,7 @@ void wxApp::CleanUp()
     // by deleting the bitmap list before g_globalCursor goes out of scope
     // (double deletion of the cursor).
     wxSetCursor(wxNullCursor);
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ < 400))
-    // another VA 3.0 memory problem here
     delete g_globalCursor;
-#endif
     g_globalCursor = NULL;
 
     wxDeleteStockObjects();
@@ -364,7 +355,7 @@ void wxApp::CleanUp()
     delete[] wxBuffer;
     wxBuffer = NULL;
 
-    //// WINDOWS-SPECIFIC CLEANUP
+    //// PM-SPECIFIC CLEANUP
 
     // wxSetKeyboardHook(FALSE);
 
@@ -478,28 +469,26 @@ int wxEntry(
     {
         if (wxTheApp->OnInit())
         {
-            nRetValue = -1;
+            nRetValue = wxTheApp->OnRun();
+//          nRetValue = -1;
         }
     }
 
-    if (nRetValue == 0)
-    {
-        wxWindow*                   pTopWindow = wxTheApp->GetTopWindow();
+    wxWindow*                       pTopWindow = wxTheApp->GetTopWindow();
 
-        if (pTopWindow)
+    if (pTopWindow)
+    {
+        // Forcibly delete the window.
+        if (pTopWindow->IsKindOf(CLASSINFO(wxFrame)) ||
+            pTopWindow->IsKindOf(CLASSINFO(wxDialog)) )
         {
-            // Forcibly delete the window.
-            if (pTopWindow->IsKindOf(CLASSINFO(wxFrame)) ||
-                pTopWindow->IsKindOf(CLASSINFO(wxDialog)) )
-            {
-                pTopWindow->Close(TRUE);
-                wxTheApp->DeletePendingObjects();
-            }
-            else
-            {
-                delete pTopWindow;
-                wxTheApp->SetTopWindow(NULL);
-            }
+            pTopWindow->Close(TRUE);
+            wxTheApp->DeletePendingObjects();
+        }
+        else
+        {
+            delete pTopWindow;
+            wxTheApp->SetTopWindow(NULL);
         }
     }
     wxTheApp->OnExit();