comctl32/ipaddress: Fix IPM_SETFOCUS return value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6f8957156e
commit
6cfc5df3f5
dlls/comctl32
|
@ -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;
|
if (index > 3 || index < 0) index=0;
|
||||||
|
|
||||||
SendMessageW (infoPtr->Part[index].EditHwnd, EM_SETSEL, 0, -1);
|
SendMessageW (infoPtr->Part[index].EditHwnd, EM_SETSEL, 0, -1);
|
||||||
SetFocus (infoPtr->Part[index].EditHwnd);
|
SetFocus (infoPtr->Part[index].EditHwnd);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -625,8 +627,7 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return IPADDRESS_SetRange (infoPtr, (int)wParam, (WORD)lParam);
|
return IPADDRESS_SetRange (infoPtr, (int)wParam, (WORD)lParam);
|
||||||
|
|
||||||
case IPM_SETFOCUS:
|
case IPM_SETFOCUS:
|
||||||
IPADDRESS_SetFocusToField (infoPtr, (int)wParam);
|
return IPADDRESS_SetFocusToField (infoPtr, (int)wParam);
|
||||||
break;
|
|
||||||
|
|
||||||
case IPM_ISBLANK:
|
case IPM_ISBLANK:
|
||||||
return IPADDRESS_IsBlank (infoPtr);
|
return IPADDRESS_IsBlank (infoPtr);
|
||||||
|
|
|
@ -105,7 +105,6 @@ static void test_IPM_SETFOCUS(void)
|
||||||
ok(from == 0 && to == 0, "Unexpected selection %u x %u.\n", from, to);
|
ok(from == 0 && to == 0, "Unexpected selection %u x %u.\n", from, to);
|
||||||
|
|
||||||
ret = SendMessageA(hwnd, IPM_SETFOCUS, 0, 0);
|
ret = SendMessageA(hwnd, IPM_SETFOCUS, 0, 0);
|
||||||
todo_wine
|
|
||||||
ok(ret, "Unexpected return value %u.\n", ret);
|
ok(ret, "Unexpected return value %u.\n", ret);
|
||||||
|
|
||||||
SendMessageA(child_enum.fields[0], EM_GETSEL, (WPARAM)&from, (LPARAM)&to);
|
SendMessageA(child_enum.fields[0], EM_GETSEL, (WPARAM)&from, (LPARAM)&to);
|
||||||
|
|
Loading…
Reference in New Issue