fixed keys behaviour in the multiline edit control (Bug 4381)
Raimonds Praude
raimonds.praude at sets.lv
Tue Jan 24 02:40:09 CST 2006
Updated WM_GETDLGCODE message processing in EditWndProc_common function:
limited the cases when multiline Edit control overtakes the keystrokes with
DLGC_WANTMESSAGE/DLGC_WANTALLKEYS. These cases are:
1) if <Control> key is pressed (e.g. Control-TAB for inserting tab) or
2) if the style of Edit control is ES_WANTRETURN and <Enter> key is pressed.
Index: dlls/user/edit.c
===================================================================
RCS file: /home/wine/wine/dlls/user/edit.c,v
retrieving revision 1.46
diff -u -r1.46 edit.c
--- dlls/user/edit.c 3 Jan 2006 12:41:26 -0000 1.46
+++ dlls/user/edit.c 23 Jan 2006 08:29:58 -0000
@@ -786,8 +786,17 @@
if (es->style & ES_MULTILINE)
{
- result |= DLGC_WANTALLKEYS;
- break;
+ if (lParam && ( ((LPMSG)lParam)->message == WM_KEYDOWN) )
+ {
+ if (GetKeyState(VK_CONTROL) >= 0)
+ {
+ int vk = (int)((LPMSG)lParam)->wParam;
+ if ( !((es->style & ES_WANTRETURN) && (vk == VK_RETURN)) )
+ break;
+ }
+ }
+ result |= DLGC_WANTMESSAGE;
+ break;
}
if (lParam && (((LPMSG)lParam)->message == WM_KEYDOWN))
More information about the wine-patches
mailing list