added correct fallback color settings for XP when used with a theme

having non-flat menu styles


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2002-03-13 16:44:45 +00:00
parent ae409cb80e
commit d1eebf4054

View File

@ -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__