[PATCH 4/5] comctl32/static: Enable parent dialog tab texture.

Zhiyi Zhang zzhang at codeweavers.com
Mon Jan 24 01:47:33 CST 2022


Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 dlls/comctl32/static.c      | 9 +++++++++
 dlls/uxtheme/tests/system.c | 3 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
index 60af6696425..d584b470a8c 100644
--- a/dlls/comctl32/static.c
+++ b/dlls/comctl32/static.c
@@ -35,6 +35,7 @@
 #include "wingdi.h"
 #include "winuser.h"
 #include "commctrl.h"
+#include "uxtheme.h"
 
 #include "wine/heap.h"
 #include "wine/debug.h"
@@ -432,12 +433,20 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
     switch (uMsg)
     {
     case WM_CREATE:
+    {
+        HWND parent;
+
         if (style < 0L || style > SS_TYPEMASK)
         {
             ERR("Unknown style 0x%02x\n", style );
             return -1;
         }
+
+        parent = GetParent( hwnd );
+        if (parent)
+            EnableThemeDialogTexture( parent, ETDT_ENABLE );
         break;
+    }
 
     case WM_NCDESTROY:
         if (style == SS_ICON)
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 32bf754e2f8..afc05b8549f 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -2097,7 +2097,6 @@ 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_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 +2120,6 @@ 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_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");
@@ -2142,7 +2140,6 @@ static void test_EnableThemeDialogTexture(void)
                           NULL);
     ok(child != NULL, "CreateWindowA failed, error %d.\n", GetLastError());
     ret = IsThemeDialogTextureEnabled(hwnd);
-    todo_wine
     ok(ret, "Wrong dialog texture status.\n");
 
     /* Test that if you move the child control to another window, it doesn't enables tab texture for
-- 
2.32.0




More information about the wine-devel mailing list