]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
Applied patch from Neil Robinson to allow manipulation of unattached menubars
[wxWidgets.git] / src / msw / app.cpp
index 02202957d78e4cca8373396f31a1ee0816d6b24a..f41554eb466509fffa646a67aaa751b32f8474de 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        app.cpp
+// Name:        src/msw/app.cpp
 // Purpose:     wxApp
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     wxApp
 // Author:      Julian Smart
 // Modified by:
 // headers
 // ---------------------------------------------------------------------------
 
 // headers
 // ---------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "app.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -296,9 +292,9 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     }
 #endif
 
     }
 #endif
 
-#if defined(__WIN95__) && !defined(__WXMICROWIN__)
+#if !defined(__WXMICROWIN__)
     InitCommonControls();
     InitCommonControls();
-#endif // __WIN95__
+#endif // !defined(__WXMICROWIN__)
 
 #if defined(__SMARTPHONE__) || defined(__POCKETPC__)
     SHInitExtraControls();
 
 #if defined(__SMARTPHONE__) || defined(__POCKETPC__)
     SHInitExtraControls();
@@ -308,10 +304,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
     RegisterWindowClasses();
 
 
     RegisterWindowClasses();
 
-#if wxUSE_PENWINDOWS
-    wxRegisterPenWin();
-#endif
-
     wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100);
 
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
     wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100);
 
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
@@ -477,10 +469,6 @@ void wxApp::CleanUp()
     wxSetKeyboardHook(false);
 #endif
 
     wxSetKeyboardHook(false);
 #endif
 
-#if wxUSE_PENWINDOWS
-    wxCleanUpPenWin();
-#endif
-
     wxOleUninitialize();
 
     // for an EXE the classes are unregistered when it terminates but DLL may
     wxOleUninitialize();
 
     // for an EXE the classes are unregistered when it terminates but DLL may
@@ -491,7 +479,7 @@ void wxApp::CleanUp()
 
     delete wxWinHandleHash;
     wxWinHandleHash = NULL;
 
     delete wxWinHandleHash;
     wxWinHandleHash = NULL;
-    
+
 #ifdef __WXWINCE__
     free( wxCanvasClassName );
     free( wxCanvasClassNameNR );
 #ifdef __WXWINCE__
     free( wxCanvasClassName );
     free( wxCanvasClassNameNR );
@@ -600,7 +588,8 @@ int wxApp::GetComCtl32Version()
 
         // we're prepared to handle the errors
         wxLogNull noLog;
 
         // we're prepared to handle the errors
         wxLogNull noLog;
-
+        
+#if wxUSE_DYNLIB_CLASS
         // do we have it?
         wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM);
 
         // do we have it?
         wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM);
 
@@ -658,6 +647,7 @@ int wxApp::GetComCtl32Version()
                 }
             }
         }
                 }
             }
         }
+#endif        
     }
 
     return s_verComCtl32;
     }
 
     return s_verComCtl32;
@@ -735,7 +725,7 @@ terminate the program,\r\n\
 \"Retry\" to exit the program normally and \"Ignore\" to try to continue."),
                 _T("Unhandled exception"),
                 MB_ABORTRETRYIGNORE |
 \"Retry\" to exit the program normally and \"Ignore\" to try to continue."),
                 _T("Unhandled exception"),
                 MB_ABORTRETRYIGNORE |
-                MB_ICONERROR| 
+                MB_ICONERROR|
                 MB_TASKMODAL
               )
            )
                 MB_TASKMODAL
               )
            )
@@ -785,4 +775,3 @@ bool wxApp::ProcessMessage(WXMSG* pMsg)
 }
 
 #endif // WXWIN_COMPATIBILITY_2_4
 }
 
 #endif // WXWIN_COMPATIBILITY_2_4
-