X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d9c0e97c580cff977d75760dc0d82c5852eec2c..cb73e6001f891ae46b12a1e4ca39b93649cb6099:/src/msw/uxtheme.cpp diff --git a/src/msw/uxtheme.cpp b/src/msw/uxtheme.cpp index e41159bad0..40a4195f6e 100644 --- a/src/msw/uxtheme.cpp +++ b/src/msw/uxtheme.cpp @@ -13,7 +13,7 @@ // declarations // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "uxtheme.h" #endif @@ -39,10 +39,7 @@ #include "wx/module.h" -#include "wx/msw/wrapwin.h" - #include "wx/msw/uxtheme.h" -#include "wx/msw/private.h" // ============================================================================ // wxUxThemeModule @@ -111,6 +108,16 @@ 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; + if ( !m_dllUxTheme.Load(_T("uxtheme.dll")) ) return false;