Fix problem with capturing [return] keys in multi-line edits.

This commit is contained in:
Vitaliy Margolen 2003-05-13 03:37:24 +00:00 committed by Alexandre Julliard
parent 32eb1c7354
commit 11c534f6cf
1 changed files with 4 additions and 17 deletions

View File

@ -744,23 +744,10 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
*/
case WM_GETDLGCODE:
result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS;
if (lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
{
int vk = (int)((LPMSG)lParam)->wParam;
if (vk == VK_RETURN && (GetWindowLongW( hwnd, GWL_STYLE ) & ES_WANTRETURN))
{
result |= DLGC_WANTMESSAGE;
}
else if (es->hwndListBox && (vk == VK_RETURN || vk == VK_ESCAPE))
{
if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0))
result |= DLGC_WANTMESSAGE;
}
}
break;
result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS
| DLGC_WANTMESSAGE;
/* Windows BUG! Windows always returns DLGC_WANTMESSAGE flag without additional checks. */
break;
case WM_IME_CHAR:
if (!unicode)