comctl32/button: Enable parent dialog tab texture.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b02405d799
commit
c5ba5e2ecb
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue