From ff8c127b6bdaf8133bae8d06f1216f5d267d4986 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Tue, 21 Apr 2020 20:36:51 +0200 Subject: notebook: add option of using a solid background unfortunately, only xp supplies actually matching color hints the color hint of Vista and later is very different from the texture used, so it looks quite ugly there :/ --- alf/alfcompat.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'alf/alfcompat.cpp') diff --git a/alf/alfcompat.cpp b/alf/alfcompat.cpp index 5416d9b..5226bb4 100644 --- a/alf/alfcompat.cpp +++ b/alf/alfcompat.cpp @@ -425,6 +425,19 @@ ALF_Compat_fallbackGetThemePartSize(HTHEME hTheme, return E_NOTIMPL; } +static HRESULT WINAPI +ALF_Compat_fallbackGetThemeColor(HTHEME hTheme, + int iPartId, + int iStateId, + int iPropId, + COLORREF *pColor) +{ + (void)hTheme; (void)iPartId; (void)iStateId; (void)iPropId; (void)pColor; + + return E_NOTIMPL; +} + + #define LOAD_FUNC(dll, name) do { \ if (_alf_dll_##dll) \ @@ -499,6 +512,7 @@ void ALF_LoadCompatFunctions(void) LOAD_FUNC(uxtheme, BufferedPaintRenderAnimation); LOAD_FUNC(uxtheme, GetThemeTransitionDuration); LOAD_FUNC(uxtheme, GetThemePartSize); + LOAD_FUNC(uxtheme, GetThemeColor); } void ALF_UnloadCompatFunctions(void) @@ -527,6 +541,7 @@ void ALF_UnloadCompatFunctions(void) UNLOAD_FUNC(BufferedPaintRenderAnimation); UNLOAD_FUNC(GetThemeTransitionDuration); UNLOAD_FUNC(GetThemePartSize); + UNLOAD_FUNC(GetThemeColor); FreeLibrary(_alf_dll_uxtheme); FreeLibrary(_alf_dll_user32); @@ -561,3 +576,4 @@ ALF_Compat_HANIMATIONBUFFER (WINAPI *ALF_Compat_BeginBufferedAnimation)(HWND,HDC HRESULT (WINAPI *ALF_Compat_EndBufferedAnimation)(ALF_Compat_HANIMATIONBUFFER,BOOL) = NULL; BOOL (WINAPI *ALF_Compat_BufferedPaintRenderAnimation)(HWND,HDC) = NULL; HRESULT (WINAPI *ALF_Compat_GetThemeTransitionDuration)(HTHEME,int,int,int,int,DWORD*) = NULL; +HRESULT (WINAPI *ALF_Compat_GetThemeColor)(HTHEME,int,int,int,COLORREF*); -- cgit v1.2.3