Commit 4b292b0c authored by Clinton Stimpson's avatar Clinton Stimpson Committed by Alexandre Julliard

riched20: Fix key handling in dialogs.

parent ae64a622
...@@ -1465,8 +1465,20 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP ...@@ -1465,8 +1465,20 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_GETDLGCODE: case WM_GETDLGCODE:
{ {
UINT code = DLGC_WANTCHARS|DLGC_WANTARROWS; UINT code = DLGC_WANTCHARS|DLGC_WANTARROWS;
if (GetWindowLongW(hWnd, GWL_STYLE)&ES_WANTRETURN) if(lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
code |= 0; /* FIXME what can we do here ? ask for messages and censor them ? */ {
int vk = (int)((LPMSG)lParam)->wParam;
/* if style says we want return key */
if((vk == VK_RETURN) && (GetWindowLongW(hWnd, GWL_STYLE) & ES_WANTRETURN))
{
code |= DLGC_WANTMESSAGE;
}
/* we always handle ctrl-tab */
if((vk == VK_TAB) && (GetKeyState(VK_CONTROL) & 0x8000))
{
code |= DLGC_WANTMESSAGE;
}
}
return code; return code;
} }
case WM_NCCREATE: case WM_NCCREATE:
......
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