From 11c534f6cfb541f847d6fca7fa584833eb66ebcf Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Tue, 13 May 2003 03:37:24 +0000 Subject: [PATCH] Fix problem with capturing [return] keys in multi-line edits. --- controls/edit.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/controls/edit.c b/controls/edit.c index 14e36294795..621c70471fa 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -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) -- 2.11.4.GIT