Fix wxMSW build with wxUSE_UXTHEME==0

Make wxUxThemeIsActive() available even in this case to fix compilation
in some places and add the unavoidable preprocessor checks in other
ones.

Closes #18207.
This commit is contained in:
Vadim Zeitlin
2018-12-08 20:17:57 +01:00
parent fd5c62bc41
commit 089eeea3ef
9 changed files with 43 additions and 29 deletions

View File

@@ -759,7 +759,7 @@ typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&);
#define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK
#define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG
#ifdef __WXMSW__
#if defined(__WXMSW__) && wxUSE_UXTHEME
#define wxHAS_NATIVE_TOOLBAR_ART
#include "wx/aui/barartmsw.h"
#define wxAuiDefaultToolBarArt wxAuiMSWToolBarArt

View File

@@ -318,7 +318,7 @@ protected:
#define wxHAS_NATIVE_TABART
#include "wx/aui/tabartgtk.h"
#define wxAuiDefaultTabArt wxAuiGtkTabArt
#elif defined(__WXMSW__)
#elif defined(__WXMSW__) && wxUSE_UXTHEME
#define wxHAS_NATIVE_TABART
#include "wx/aui/tabartmsw.h"
#define wxAuiDefaultTabArt wxAuiMSWTabArt

View File

@@ -13,6 +13,8 @@
#include "wx/defs.h"
#if wxUSE_UXTHEME
#include "wx/msw/private.h" // we use GetHwndOf()
#include <uxtheme.h>
@@ -253,5 +255,11 @@ private:
wxDECLARE_NO_COPY_CLASS(wxUxThemeHandle);
};
#else // !wxUSE_UXTHEME
inline bool wxUxThemeIsActive() { return false; }
#endif // wxUSE_UXTHEME/!wxUSE_UXTHEME
#endif // _WX_UXTHEME_H_

View File

@@ -12,7 +12,7 @@
#include "wx/defs.h"
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#if defined(__WXMSW__) && wxUSE_UXTHEME && !defined(__WXUNIVERSAL__)
#define wxHAS_SYSTEM_THEMED_CONTROL
#endif