Nikolay Sivov : comctl32/ipaddress: Fix IPM_SETFOCUS return value.

Alexandre Julliard julliard at winehq.org
Thu Oct 8 15:20:06 CDT 2020


Module: wine
Branch: master
Commit: 6cfc5df3f5896e4fd5a6dd03db80faa48477c045
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6cfc5df3f5896e4fd5a6dd03db80faa48477c045

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Oct  8 17:03:26 2020 +0300

comctl32/ipaddress: Fix IPM_SETFOCUS return value.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/ipaddress.c       | 11 ++++++-----
 dlls/comctl32/tests/ipaddress.c |  1 -
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index d415a96fb7..d08a2be3fd 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -387,14 +387,16 @@ static LRESULT IPADDRESS_SetAddress (const IPADDRESS_INFO *infoPtr, DWORD ip_add
 }
 
 
-static void IPADDRESS_SetFocusToField (const IPADDRESS_INFO *infoPtr, INT index)
+static LRESULT IPADDRESS_SetFocusToField (const IPADDRESS_INFO *infoPtr, INT index)
 {
-    TRACE("(index=%d)\n", index);
+    TRACE("%d\n", index);
 
     if (index > 3 || index < 0) index=0;
 
     SendMessageW (infoPtr->Part[index].EditHwnd, EM_SETSEL, 0, -1);
     SetFocus (infoPtr->Part[index].EditHwnd);
+
+    return 1;
 }
 
 
@@ -624,9 +626,8 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 	case IPM_SETRANGE:
 	    return IPADDRESS_SetRange (infoPtr, (int)wParam, (WORD)lParam);
 
-	case IPM_SETFOCUS:
-	    IPADDRESS_SetFocusToField (infoPtr, (int)wParam);
-	    break;
+        case IPM_SETFOCUS:
+            return IPADDRESS_SetFocusToField (infoPtr, (int)wParam);
 
 	case IPM_ISBLANK:
 	    return IPADDRESS_IsBlank (infoPtr);
diff --git a/dlls/comctl32/tests/ipaddress.c b/dlls/comctl32/tests/ipaddress.c
index 5a5aafe7aa..939bfe7540 100644
--- a/dlls/comctl32/tests/ipaddress.c
+++ b/dlls/comctl32/tests/ipaddress.c
@@ -105,7 +105,6 @@ static void test_IPM_SETFOCUS(void)
     ok(from == 0 && to == 0, "Unexpected selection %u x %u.\n", from, to);
 
     ret = SendMessageA(hwnd, IPM_SETFOCUS, 0, 0);
-todo_wine
     ok(ret, "Unexpected return value %u.\n", ret);
 
     SendMessageA(child_enum.fields[0], EM_GETSEL, (WPARAM)&from, (LPARAM)&to);




More information about the wine-cvs mailing list