riched20: Fix key handling in dialogs.

This commit is contained in:
Clinton Stimpson 2006-11-13 21:33:42 -07:00 committed by Alexandre Julliard
parent ae64a62241
commit 4b292b0cb5
1 changed files with 14 additions and 2 deletions

View File

@ -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: