Clinton Stimpson : riched20: Fix key handling in dialogs.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 15 05:37:47 CST 2006


Module: wine
Branch: master
Commit: 4b292b0cb52c8a86a77999f5a0a77a6e704ff82c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4b292b0cb52c8a86a77999f5a0a77a6e704ff82c

Author: Clinton Stimpson <cjstimpson at utwire.net>
Date:   Mon Nov 13 21:33:42 2006 -0700

riched20: Fix key handling in dialogs.

---

 dlls/riched20/editor.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 07aa4e0..779a6bc 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1465,8 +1465,20 @@ LRESULT WINAPI RichEditANSIWndProc(HWND
   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:




More information about the wine-cvs mailing list