]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
toplevel event handler exposed
[wxWidgets.git] / src / msw / app.cpp
index 2b69e913004dfc9dd2431da74cb3505cca1f3dcf..6143dbb8520365c7628e55da3bc9ce480eb463e5 100644 (file)
@@ -276,13 +276,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
 #if wxUSE_OLE || wxUSE_DRAG_AND_DROP
 
-#ifdef __WIN16__
-    // for OLE, enlarge message queue to be as large as possible
-    int iMsg = 96;
-    while (!SetMessageQueue(iMsg) && (iMsg -= 8))
-        ;
-#endif // Win16
-
 #if wxUSE_OLE
     // we need to initialize OLE library
 #ifdef __WXWINCE__
@@ -326,13 +319,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
     wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100);
 
-    // This is to foil optimizations in Visual C++ that throw out dummy.obj.
-    // PLEASE DO NOT ALTER THIS.
-#if defined(__VISUALC__) && defined(__WIN16__) && !defined(WXMAKINGDLL)
-    extern char wxDummyChar;
-    if (wxDummyChar) wxDummyChar++;
-#endif
-
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
     wxSetKeyboardHook(TRUE);
 #endif
@@ -486,6 +472,12 @@ bool wxApp::UnregisterWindowClasses()
 
 void wxApp::CleanUp()
 {
+    // all objects pending for deletion must be deleted first, otherwise we
+    // would crash when they use wxWinHandleHash (and UnregisterWindowClasses()
+    // call wouldn't succeed as long as any windows still exist), so call the
+    // base class method first and only then do our clean up
+    wxAppBase::CleanUp();
+
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
     wxSetKeyboardHook(FALSE);
 #endif
@@ -517,8 +509,6 @@ void wxApp::CleanUp()
 
     delete wxWinHandleHash;
     wxWinHandleHash = NULL;
-
-    wxAppBase::CleanUp();
 }
 
 // ----------------------------------------------------------------------------
@@ -545,18 +535,6 @@ wxApp::~wxApp()
     delete [] argv;
 }
 
-bool wxApp::Initialized()
-{
-#ifndef _WINDLL
-    if (GetTopWindow())
-        return TRUE;
-    else
-        return FALSE;
-#else // Assume initialized if DLL (no way of telling)
-    return TRUE;
-#endif
-}
-
 void wxApp::OnIdle(wxIdleEvent& event)
 {
     wxAppBase::OnIdle(event);