[PATCH 3/5] comctl32/button: Enable parent dialog tab texture.
Zhiyi Zhang
zzhang at codeweavers.com
Mon Jan 24 01:47:17 CST 2022
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
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");
--
2.32.0
More information about the wine-devel
mailing list