X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68d95db4d050d4388b3f544b67adefd85b73a018..2d956b58023a4955313a1c1531bc70a0deb0b831:/src/msw/settings.cpp diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 4793d47ff3..5cf3b79700 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -33,6 +33,10 @@ #include "wx/msw/private.h" +#ifndef SPI_GETFLATMENU +#define SPI_GETFLATMENU 0x1022 +#endif + #include "wx/module.h" #include "wx/fontutil.h" @@ -156,7 +160,17 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) { // 5.1 is Windows XP useDefault = FALSE; - } + // Determine if we are using flat menus, only then allow wxSYS_COLOUR_MENUBAR + if ( index == wxSYS_COLOUR_MENUBAR ) + { + BOOL isFlat ; + if ( SystemParametersInfo( SPI_GETFLATMENU , 0 ,&isFlat, 0 ) ) + { + if ( !isFlat ) + index = wxSYS_COLOUR_MENU ; + } + } + } #else useDefault = TRUE; #endif // __WIN32__