diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 07aa4e07803..779a6bc2429 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1465,8 +1465,20 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP case WM_GETDLGCODE: { UINT code = DLGC_WANTCHARS|DLGC_WANTARROWS; - if (GetWindowLongW(hWnd, GWL_STYLE)&ES_WANTRETURN) - code |= 0; /* FIXME what can we do here ? ask for messages and censor them ? */ + if(lParam && (((LPMSG)lParam)->message == WM_KEYDOWN)) + { + 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; } case WM_NCCREATE: