Commit 12a417de authored by Sergey Khodych's avatar Sergey Khodych Committed by Alexandre Julliard

riched20: Implement handling of WM_KEYDOWN VK_TAB in the dialog mode.

parent a50ca4ac
......@@ -2293,6 +2293,10 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
if (editor->bDialogMode && editor->hwndParent)
PostMessageW(editor->hwndParent, WM_CLOSE, 0, 0);
return TRUE;
case VK_TAB:
if (editor->bDialogMode && editor->hwndParent)
SendMessageW(editor->hwndParent, WM_NEXTDLGCTL, shift_is_down, 0);
return TRUE;
case 'A':
if (ctrl_is_down)
{
......
......@@ -6816,6 +6816,11 @@ static void test_dialogmode(void)
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 1, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 1);
DestroyWindow(hwRichEdit);
/* Check messages from richedit(ES_MULTILINE) */
......@@ -6836,6 +6841,11 @@ static void test_dialogmode(void)
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg);
ok(0x8f == r, "expected 0x8f, got 0x%x\n", r);
test_dm_messages(0, 0, 0);
......@@ -6853,6 +6863,11 @@ static void test_dialogmode(void)
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 1);
hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON,
100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL);
ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError());
......@@ -6886,6 +6901,11 @@ static void test_dialogmode(void)
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg);
ok(0x8f == r, "expected 0x8f, got 0x%x\n", r);
test_dm_messages(0, 0, 0);
......@@ -6903,6 +6923,11 @@ static void test_dialogmode(void)
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 1);
hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON,
100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL);
ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError());
......@@ -6933,6 +6958,11 @@ static void test_dialogmode(void)
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg);
ok(0x8b == r, "expected 0x8b, got 0x%x\n", r);
test_dm_messages(0, 0, 0);
......@@ -6947,6 +6977,11 @@ static void test_dialogmode(void)
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 0);
memset(&dm_messages, 0, sizeof(dm_messages));
r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001);
ok(0 == r, "expected 0, got %d\n", r);
test_dm_messages(0, 0, 1);
hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON,
100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL);
ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment