Zhiyi Zhang : uxtheme: Use tab background as dialog texture for more WM_CTLCOLOR* messages.

Alexandre Julliard julliard at winehq.org
Wed Feb 9 16:03:48 CST 2022


Module: wine
Branch: master
Commit: 25daa0fa06e94bf26b82035023d5490eb49e0f68
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=25daa0fa06e94bf26b82035023d5490eb49e0f68

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Wed Feb  9 16:44:34 2022 +0800

uxtheme: Use tab background as dialog texture for more WM_CTLCOLOR* messages.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/uxtheme/dialog.c       |  3 +++
 dlls/uxtheme/tests/system.c | 15 ++-------------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/dlls/uxtheme/dialog.c b/dlls/uxtheme/dialog.c
index 87c2b7d1c13..b91e20f0f33 100644
--- a/dlls/uxtheme/dialog.c
+++ b/dlls/uxtheme/dialog.c
@@ -149,6 +149,9 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, BOO
         SetBrushOrgEx(hdc, old_org.x, old_org.y, NULL);
         return TRUE;
     }
+    case WM_CTLCOLORMSGBOX:
+    case WM_CTLCOLORBTN:
+    case WM_CTLCOLORDLG:
     case WM_CTLCOLORSTATIC:
     {
         dlgproc = (WNDPROC)GetWindowLongPtrW(hwnd, DWLP_DLGPROC);
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 77a12f3fa44..c70e6c27361 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -1854,7 +1854,6 @@ static void test_EnableThemeDialogTexture(void)
         }
         else
         {
-            todo_wine_if(msg != WM_CTLCOLORSTATIC)
             ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
         }
 
@@ -1863,7 +1862,6 @@ static void test_EnableThemeDialogTexture(void)
         ok(old_mode != 0, "SetBkMode failed.\n");
         SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
         mode = SetBkMode(child_hdc, old_mode);
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
 
         /* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
@@ -1879,24 +1877,18 @@ static void test_EnableThemeDialogTexture(void)
         memset(&log_brush, 0, sizeof(log_brush));
         count = GetObjectA(brush, sizeof(log_brush), &log_brush);
         ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
            log_brush.lbStyle);
 
         memset(&bmp, 0, sizeof(bmp));
         count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
 
         /* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
         brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
         brush2 = (HBRUSH)DefDlgProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
         ok(brush2 == brush, "Expected the same brush.\n");
@@ -1905,24 +1897,21 @@ static void test_EnableThemeDialogTexture(void)
 
         /* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
         brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
-        todo_wine_if(msg != WM_CTLCOLORSTATIC)
         ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
         if (msg != WM_CTLCOLORDLG)
         {
             brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
-            todo_wine_if(msg == WM_CTLCOLORSTATIC)
+            todo_wine
             ok(brush2 == brush, "Expected the same brush.\n");
             brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
-            todo_wine_if(msg == WM_CTLCOLORSTATIC)
+            todo_wine
             ok(brush2 == brush, "Expected the same brush.\n");
         }
         else
         {
             brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
-            todo_wine
             ok(brush2 != brush, "Expected a different brush.\n");
             brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
-            todo_wine
             ok(brush2 != brush, "Expected a different brush.\n");
         }
 




More information about the wine-cvs mailing list