Sergey Khodych : riched20: Enable the dialog mode after receiving WM_GETDLGCODE message.

Alexandre Julliard julliard at winehq.org
Tue Oct 13 10:52:55 CDT 2009


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

Author: Sergey Khodych <khodych at gmail.com>
Date:   Sun Oct  4 21:41:48 2009 +0300

riched20: Enable the dialog mode after receiving WM_GETDLGCODE message.

---

 dlls/riched20/editor.c  |    3 +++
 dlls/riched20/editstr.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 11d4925..9f56761 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2665,6 +2665,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
   ed->mode |= (props & TXTBIT_RICHTEXT) ? TM_RICHTEXT : TM_PLAINTEXT;
   ed->AutoURLDetect_bEnable = FALSE;
   ed->bHaveFocus = FALSE;
+  ed->bDialogMode = FALSE;
   ed->bMouseCaptured = FALSE;
   for (i=0; i<HFONT_CACHE_SIZE; i++)
   {
@@ -3008,6 +3009,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
   case WM_GETDLGCODE:
   {
     UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL;
+    if (lParam)
+      editor->bDialogMode = TRUE;
     if (editor->styleFlags & ES_MULTILINE)
       code |= DLGC_WANTMESSAGE;
     return code;
diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h
index 115662c..9b8d645 100644
--- a/dlls/riched20/editstr.h
+++ b/dlls/riched20/editstr.h
@@ -370,6 +370,7 @@ typedef struct tagME_TextEditor
   BOOL AutoURLDetect_bEnable;
   WCHAR cPasswordMask;
   BOOL bHaveFocus;
+  BOOL bDialogMode; /* Indicates that we are inside a dialog window */
   /*for IME */
   int imeStartIndex;
   DWORD selofs; /* The size of the selection bar on the left side of control */




More information about the wine-cvs mailing list