]> git.saurik.com Git - wxWidgets.git/commitdiff
check for comctl32.dll version in wxUxThemeEngine::Initialize()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Aug 2003 22:04:46 +0000 (22:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Aug 2003 22:04:46 +0000 (22:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/uxtheme.h
src/msw/uxtheme.cpp

index da91ed7d0e3957522ac96343bc53984c4a0157c2..2518a03bcf10dafba8d52d46cfb6222f9875e7be 100644 (file)
@@ -310,10 +310,6 @@ public:
     wxUX_THEME_DECLARE(PFNWXUDRAWTHEMEPARENTBACKGROUND, DrawThemeParentBackground)
     wxUX_THEME_DECLARE(PFNWXUENABLETHEMING, EnableTheming)
 
-    // This calls IsAppThemed but also checks the commctrl.dll version
-    // for a more reliable answer.
-    bool IsAppThemedEx() ;
-
 private:
     // construcor is private as only Get() can create us and is also trivial as
     // everything really happens in Initialize()
index 328bb33bf297220b024888f3013240d90e5f241b..f2155c45f7992145c3cd88c451a8efa4169dfcc2 100644 (file)
@@ -108,6 +108,13 @@ wxUxThemeEngine* wxUxThemeEngine::Get()
 
 bool wxUxThemeEngine::Initialize()
 {
+    if ( wxTheApp->GetComCtl32Version() < 600 )
+    {
+        // not using theme-aware comctl32.dll anyhow, don't even try to use
+        // themes
+        return false;
+    }
+        
     // we're prepared to handle the errors
     wxLogNull noLog;
 
@@ -172,21 +179,5 @@ bool wxUxThemeEngine::Initialize()
     return true;
 }
 
-// This calls IsAppThemed but also checks the commctrl.dll version
-// for a more reliable answer.
-bool wxUxThemeEngine::IsAppThemedEx()
-{
-    static bool g_TestedForTheme = FALSE;
-    static bool g_UseTheme = FALSE;
-    if (!g_TestedForTheme)
-    {
-        int commCtrlVersion = wxTheApp->GetComCtl32Version() ;
-        
-        g_UseTheme = (commCtrlVersion >= 600);
-        g_TestedForTheme = TRUE;
-    }
-    return IsAppThemed() && g_UseTheme;
-}
-
 #endif // wxUSE_UXTHEME