]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
Also mention wxRound() and wxIsSameDouble()
[wxWidgets.git] / src / msw / app.cpp
index 00f768bf6b4bf5b66bced1c76581ef6fb0f626ea..56af196bdd687f04b84cc3c562d86279df5cf12d 100644 (file)
@@ -654,7 +654,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
     for ( size_t n = 0; n < count; n++ )
     {
         if ( gs_regClassesInfo[n].basename == name )
-            return gs_regClassesInfo[n].regname;
+            return gs_regClassesInfo[n].regname.c_str();
     }
 
     // we need to register this class
@@ -696,7 +696,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
     {
         wxLogLastError(wxString::Format(wxT("RegisterClass(%s)"),
                        regClass.regname));
-        ::UnregisterClass(regClass.regname, wxhInstance);
+        ::UnregisterClass(regClass.regname.c_str(), wxhInstance);
         return NULL;
     }
 
@@ -728,13 +728,13 @@ void wxApp::UnregisterWindowClasses()
     for ( size_t n = 0; n < count; n++ )
     {
         const ClassRegInfo& regClass = gs_regClassesInfo[n];
-        if ( !::UnregisterClass(regClass.regname, wxhInstance) )
+        if ( !::UnregisterClass(regClass.regname.c_str(), wxhInstance) )
         {
             wxLogLastError(wxString::Format(wxT("UnregisterClass(%s)"),
                            regClass.regname));
         }
 
-        if ( !::UnregisterClass(regClass.regnameNR, wxhInstance) )
+        if ( !::UnregisterClass(regClass.regnameNR.c_str(), wxhInstance) )
         {
             wxLogLastError(wxString::Format(wxT("UnregisterClass(%s)"),
                            regClass.regnameNR));
@@ -917,10 +917,7 @@ int wxApp::GetComCtl32Version()
         // depending on the OS version and the presence of the manifest, it can
         // be either v5 or v6 and instead of trying to guess it just get the
         // handle of the already loaded version
-        wxDynamicLibrary dllComCtl32(_T("comctl32.dll"),
-                                     wxDL_VERBATIM |
-                                     wxDL_QUIET |
-                                     wxDL_GET_LOADED);
+        wxLoadedDLL dllComCtl32(_T("comctl32.dll"));
         if ( !dllComCtl32.IsLoaded() )
         {
             s_verComCtl32 = 0;
@@ -958,9 +955,6 @@ int wxApp::GetComCtl32Version()
                 }
             }
         }
-
-        // we shouldn't unload it here as we didn't really load it above
-        dllComCtl32.Detach();
     }
 
     return s_verComCtl32;
@@ -1021,10 +1015,7 @@ int wxApp::GetShell32Version()
 
 bool wxApp::Yield(bool onlyIfNeeded)
 {
-    // MT-FIXME
-    static bool s_inYield = false;
-
-    if ( s_inYield )
+    if ( m_isInsideYield )
     {
         if ( !onlyIfNeeded )
         {
@@ -1035,8 +1026,8 @@ bool wxApp::Yield(bool onlyIfNeeded)
     }
 
     // set the flag and don't forget to reset it before returning
-    s_inYield = true;
-    wxON_BLOCK_EXIT_SET(s_inYield, false);
+    m_isInsideYield = true;
+    wxON_BLOCK_EXIT_SET(m_isInsideYield, false);
 
 
 #if wxUSE_LOG