X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3255bce3209598cda0e2eae91132aa0b90da950b..e0176dd9fb716ad0a1a8804f0a93e16048f09054:/src/msw/uxtheme.cpp diff --git a/src/msw/uxtheme.cpp b/src/msw/uxtheme.cpp index 328bb33bf2..7c16e03a29 100644 --- a/src/msw/uxtheme.cpp +++ b/src/msw/uxtheme.cpp @@ -5,15 +5,15 @@ // Modified by: // Created: 2003 // RCS-ID: $Id$ -// Copyright: (c) 2003 wxWindows Dev-Team -// License: wxWindows license +// Copyright: (c) 2003 wxWidgets Dev-Team +// License: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ // declarations // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "uxtheme.h" #endif @@ -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