From 15b9273998ce81a33ad1cb4cf1ed23b85c70a340 Mon Sep 17 00:00:00 2001 From: vincents Date: Sun, 21 May 2006 20:48:57 +0000 Subject: [PATCH] fixed main menubar for windows clasic theme (issue #6950) from Martin Smat git-svn-id: trunk@9332 - --- lcl/interfaces/win32/win32wsmenus.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/win32/win32wsmenus.pp b/lcl/interfaces/win32/win32wsmenus.pp index c7b9ea737a..95f0e65b2c 100644 --- a/lcl/interfaces/win32/win32wsmenus.pp +++ b/lcl/interfaces/win32/win32wsmenus.pp @@ -373,10 +373,12 @@ begin end; function BackgroundColorMenu(const aSelected: boolean; const aInMainMenu: boolean): COLORREF; +var IsFlatMenu: Windows.BOOL; begin if aSelected then Result := GetSysColor(COLOR_HIGHLIGHT) - else if aInMainMenu and (GetSysColorBrush(COLOR_MENUBAR) <> 0) then // COLOR_MENUBAR is not supported on Windows version < XP + // SPI_GETFLATMENU = 0x1022, it is not yet defined in the FPC + else if aInMainMenu and (SystemParametersInfo($1022, 0, @IsFlatMenu, 0)) and IsFlatMenu then // COLOR_MENUBAR is not supported on Windows version < XP Result := GetSysColor(COLOR_MENUBAR) else Result := GetSysColor(COLOR_MENU);