Commit 2f1bbd88 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

uxtheme: Do not draw parent background when handling WM_CTLCOLORSTATIC for static controls.

SetBkMode(TRANSPARENT) already indicates that the parent background should remain untouched. Drawing parent background destroys any previous content that applications drawn and some applications rely on the content being unchanged. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51914Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e17aedb2
......@@ -458,7 +458,6 @@ static void test_WM_CTLCOLORSTATIC(void)
todo_wine_if(todo)
ok(mode == OPAQUE, "Expected mode %#x, got %#x.\n", OPAQUE, mode);
color = GetPixel(dialog_hdc, 40, 40);
todo_wine_if(todo)
ok(color == 0, "Expected pixel %#x, got %#x.\n", 0, color);
ReleaseDC(child, child_hdc);
......
......@@ -101,15 +101,11 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
HDC controlDC = (HDC)wParam;
HWND controlWnd = (HWND)lParam;
WCHAR controlClass[32];
RECT rc;
GetClassNameW (controlWnd, controlClass, ARRAY_SIZE(controlClass));
if (lstrcmpiW (controlClass, WC_STATICW) == 0)
{
/* Static control - draw parent background and set text to
* transparent, so it looks right on tab pages. */
GetClientRect (controlWnd, &rc);
DrawThemeParentBackground (controlWnd, controlDC, &rc);
SetBkColor(controlDC, GetSysColor(COLOR_BTNFACE));
SetBkMode (controlDC, TRANSPARENT);
/* Return NULL brush since we painted the BG already */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment