mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
user32: Handle WM_CHAR messages better in edit controls.
This commit is contained in:
parent
5d6bf737db
commit
0fac05b977
@ -853,12 +853,22 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
|
||||
MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1);
|
||||
}
|
||||
|
||||
if ((charW == VK_RETURN || charW == VK_ESCAPE) && es->hwndListBox)
|
||||
{
|
||||
if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
|
||||
SendMessageW(GetParent(hwnd), WM_KEYDOWN, charW, 0);
|
||||
break;
|
||||
}
|
||||
if (es->hwndListBox)
|
||||
{
|
||||
if (charW == VK_RETURN || charW == VK_ESCAPE)
|
||||
{
|
||||
if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
|
||||
{
|
||||
SendMessageW(GetParent(hwnd), WM_KEYDOWN, charW, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (charW == VK_TAB || charW == VK_RETURN)
|
||||
break;
|
||||
}
|
||||
EDIT_WM_Char(es, charW);
|
||||
break;
|
||||
}
|
||||
|
@ -1296,9 +1296,9 @@ static void test_edit_dialog(void)
|
||||
r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 3);
|
||||
ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 4);
|
||||
todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 5);
|
||||
todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
|
||||
/* tests for WM_KEYDOWN + WM_CHAR */
|
||||
r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 6);
|
||||
@ -1306,7 +1306,7 @@ static void test_edit_dialog(void)
|
||||
r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 7);
|
||||
todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 8);
|
||||
todo_wine ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
ok(444 == r, "Expected %d, got %d\n", 444, r);
|
||||
}
|
||||
|
||||
static BOOL RegisterWindowClasses (void)
|
||||
|
Loading…
Reference in New Issue
Block a user