user32/combo: Properly handle WM_CTLCOLOR* messages.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Fabian Maurer 2019-11-04 10:30:29 +03:00 committed by Alexandre Julliard
parent 1dc3ec2cdc
commit fbec0ba9ee
2 changed files with 12 additions and 2 deletions

View File

@ -1988,6 +1988,18 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
if (GET_WHEEL_DELTA_WPARAM(wParam) < 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_DOWN, 0);
return TRUE;
case WM_CTLCOLOR:
case WM_CTLCOLORMSGBOX:
case WM_CTLCOLOREDIT:
case WM_CTLCOLORLISTBOX:
case WM_CTLCOLORBTN:
case WM_CTLCOLORDLG:
case WM_CTLCOLORSCROLLBAR:
case WM_CTLCOLORSTATIC:
if (lphc->owner)
return SendMessageW(lphc->owner, message, wParam, lParam);
break;
/* Combo messages */
case CB_ADDSTRING:

View File

@ -854,7 +854,6 @@ static void test_combo_ctlcolor(void)
for (i = 0; i < ARRAY_SIZE(messages); ++i)
{
brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem);
todo_wine
ok(brush == brush_red, "%u: unexpected brush %p, expected got %p.\n", i, brush, brush_red);
}
@ -865,7 +864,6 @@ static void test_combo_ctlcolor(void)
for (i = 0; i < ARRAY_SIZE(messages); ++i)
{
brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem);
todo_wine
ok(!brush, "%u: unexpected brush %p.\n", i, brush);
}