Zhiyi Zhang : comctl32/button: Enable parent dialog tab texture.
Alexandre Julliard
julliard at winehq.org
Mon Jan 24 16:28:04 CST 2022
Module: wine
Branch: master
Commit: c5ba5e2ecb0091fc2462ea183cf2ce6150f55813
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c5ba5e2ecb0091fc2462ea183cf2ce6150f55813
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Mon Jan 24 15:47:17 2022 +0800
comctl32/button: Enable parent dialog tab texture.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/button.c | 8 ++++++++
dlls/uxtheme/tests/system.c | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 72c1a17402c..a2a1c9e0561 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -526,6 +526,9 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
break;
case WM_CREATE:
+ {
+ HWND parent;
+
if (btn_type >= MAX_BTN_TYPE)
return -1; /* abort */
@@ -537,7 +540,12 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
}
infoPtr->state = BST_UNCHECKED;
OpenThemeData( hWnd, WC_BUTTONW );
+
+ parent = GetParent( hWnd );
+ if (parent)
+ EnableThemeDialogTexture( parent, ETDT_ENABLE );
return 0;
+ }
case WM_DESTROY:
theme = GetWindowTheme( hWnd );
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 540cd7d2fcd..32bf754e2f8 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -2097,7 +2097,7 @@ static void test_EnableThemeDialogTexture(void)
child_hdc = GetDC(child);
brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
if (class_tests[i].texture_enabled)
- todo_wine
+ todo_wine_if(!lstrcmpA(class_tests[i].param.class_name, WC_STATICA))
ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture enabled.\n");
else
ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture disabled.\n");
@@ -2121,7 +2121,7 @@ static void test_EnableThemeDialogTexture(void)
child_hdc = GetDC(child);
brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
if (class_tests[i].texture_enabled)
- todo_wine
+ todo_wine_if(!lstrcmpA(class_tests[i].param.class_name, WC_STATICA))
ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture enabled.\n");
else
ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture disabled.\n");
More information about the wine-cvs
mailing list