Commit 8fb119ba authored by Sergey Khodych's avatar Sergey Khodych Committed by Alexandre Julliard

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

parent 851c33dd
......@@ -2145,6 +2145,31 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
ME_SendRequestResize(editor, FALSE);
return TRUE;
case VK_RETURN:
if (editor->bDialogMode)
{
if (ctrl_is_down)
return TRUE;
if (!(editor->styleFlags & ES_WANTRETURN))
{
if (editor->hwndParent)
{
DWORD dw;
dw = SendMessageW(editor->hwndParent, DM_GETDEFID, 0, 0);
if (HIWORD(dw) == DC_HASDEFID)
{
HWND hwDefCtrl = GetDlgItem(editor->hwndParent, LOWORD(dw));
if (hwDefCtrl)
{
SendMessageW(editor->hwndParent, WM_NEXTDLGCTL, (WPARAM)hwDefCtrl, (LPARAM)TRUE);
PostMessageW(hwDefCtrl, WM_KEYDOWN, VK_RETURN, 0);
}
}
}
return TRUE;
}
}
if (editor->styleFlags & ES_MULTILINE)
{
ME_Cursor cursor = editor->pCursors[0];
......
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