user32: edit: Improve handling of WM_KEYDOWN VK_TAB in a dialog mode.
This commit is contained in:
parent
3b6ea11481
commit
d4707dbb60
|
@ -3641,7 +3641,8 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
|
||||||
PostMessageW(es->hwndParent, WM_CLOSE, 0, 0);
|
PostMessageW(es->hwndParent, WM_CLOSE, 0, 0);
|
||||||
break;
|
break;
|
||||||
case VK_TAB:
|
case VK_TAB:
|
||||||
SendMessageW(es->hwndParent, WM_NEXTDLGCTL, shift, 0);
|
if ((es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es))
|
||||||
|
SendMessageW(es->hwndParent, WM_NEXTDLGCTL, shift, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -2192,12 +2192,36 @@ static void test_dialogmode(void)
|
||||||
test_dm_messages(0, 0, 0, 0);
|
test_dm_messages(0, 0, 0, 0);
|
||||||
zero_dm_messages();
|
zero_dm_messages();
|
||||||
|
|
||||||
|
r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
|
||||||
|
ok(1 == r, "expected 1, got %d\n", r);
|
||||||
|
test_dm_messages(0, 0, 0, 0);
|
||||||
|
zero_dm_messages();
|
||||||
|
|
||||||
|
msg.hwnd = hwEdit;
|
||||||
|
msg.message = WM_KEYDOWN;
|
||||||
|
msg.wParam = VK_TAB;
|
||||||
|
msg.lParam = 0xf0001;
|
||||||
|
r = SendMessage(hwEdit, WM_GETDLGCODE, VK_TAB, (LPARAM)&msg);
|
||||||
|
ok(0x89 == r, "expected 0x89, got 0x%x\n", r);
|
||||||
|
test_dm_messages(0, 0, 0, 0);
|
||||||
|
zero_dm_messages();
|
||||||
|
|
||||||
|
r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
|
||||||
|
ok(1 == r, "expected 1, got %d\n", r);
|
||||||
|
test_dm_messages(0, 0, 0, 0);
|
||||||
|
zero_dm_messages();
|
||||||
|
|
||||||
destroy_child_editcontrol(hwEdit);
|
destroy_child_editcontrol(hwEdit);
|
||||||
|
|
||||||
hwEdit = create_child_editcontrol(ES_MULTILINE, 0);
|
hwEdit = create_child_editcontrol(ES_MULTILINE, 0);
|
||||||
hwParent = GetParent(hwEdit);
|
hwParent = GetParent(hwEdit);
|
||||||
SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)dialog_mode_wnd_proc);
|
SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)dialog_mode_wnd_proc);
|
||||||
|
|
||||||
|
r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
|
||||||
|
ok(1 == r, "expected 1, got %d\n", r);
|
||||||
|
test_dm_messages(0, 0, 0, 0);
|
||||||
|
zero_dm_messages();
|
||||||
|
|
||||||
msg.hwnd = hwEdit;
|
msg.hwnd = hwEdit;
|
||||||
msg.message = WM_KEYDOWN;
|
msg.message = WM_KEYDOWN;
|
||||||
msg.wParam = VK_ESCAPE;
|
msg.wParam = VK_ESCAPE;
|
||||||
|
@ -2212,6 +2236,11 @@ static void test_dialogmode(void)
|
||||||
test_dm_messages(0, 0, 0, 0);
|
test_dm_messages(0, 0, 0, 0);
|
||||||
zero_dm_messages();
|
zero_dm_messages();
|
||||||
|
|
||||||
|
r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
|
||||||
|
ok(1 == r, "expected 1, got %d\n", r);
|
||||||
|
test_dm_messages(0, 0, 0, 1);
|
||||||
|
zero_dm_messages();
|
||||||
|
|
||||||
destroy_child_editcontrol(hwEdit);
|
destroy_child_editcontrol(hwEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue