Zhiyi Zhang : comctl32/static: Enable parent dialog tab texture.
Alexandre Julliard
julliard at winehq.org
Mon Jan 24 16:28:04 CST 2022
Module: wine
Branch: master
Commit: 9083b1e8b1888077c648a4dd8e908113700945a4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9083b1e8b1888077c648a4dd8e908113700945a4
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Mon Jan 24 15:47:33 2022 +0800
comctl32/static: 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/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
More information about the wine-cvs
mailing list