Fabian Maurer : user32/combo: Properly handle WM_CTLCOLOR* messages.

Alexandre Julliard julliard at winehq.org
Mon Apr 20 15:01:51 CDT 2020


Module: wine
Branch: oldstable
Commit: ce50dc4a3e9f8ed23242df45e6df7ccf8976bdb7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ce50dc4a3e9f8ed23242df45e6df7ccf8976bdb7

Author: Fabian Maurer <dark.shadow4 at web.de>
Date:   Mon Nov  4 10:30:29 2019 +0300

user32/combo: Properly handle WM_CTLCOLOR* messages.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit fbec0ba9eeb12cc153e1e4e0ca98734fe5bc593a)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/user32/combo.c       | 12 ++++++++++++
 dlls/user32/tests/combo.c |  2 --
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index 59c2e6484c..4ddccd6c95 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -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:
diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c
index 289e1d3f56..6b51ff9719 100644
--- a/dlls/user32/tests/combo.c
+++ b/dlls/user32/tests/combo.c
@@ -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);
     }
 




More information about the wine-cvs mailing list