Commit c5ba5e2e authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32/button: Enable parent dialog tab texture.

parent b02405d7
......@@ -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 );
......
......@@ -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");
......
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