Dylan Smith : richedit: Updated internal style flags on EM_SHOWSCROLLBAR.

Alexandre Julliard julliard at winehq.org
Wed Jan 28 08:03:09 CST 2009


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

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Wed Jan 28 01:35:06 2009 -0500

richedit: Updated internal style flags on EM_SHOWSCROLLBAR.

The internal style flags are used to determine whether to show or hide
the scrollbar when ME_UpdateScrollBar is called.  EM_SHOWSCROLLBAR seems
to update this state in native richedit controls.

---

 dlls/riched20/editor.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index cd130a5..4495fb4 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3183,6 +3183,28 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
   }
   case EM_SHOWSCROLLBAR:
   {
+    DWORD flags;
+
+    switch (wParam)
+    {
+      case SB_HORZ:
+        flags = WS_HSCROLL;
+        break;
+      case SB_VERT:
+        flags = WS_VSCROLL;
+        break;
+      case SB_BOTH:
+        flags = WS_HSCROLL|WS_VSCROLL;
+        break;
+      default:
+        return 0;
+    }
+
+    if (lParam)
+      editor->styleFlags |= flags;
+    else
+      editor->styleFlags &= flags;
+
     ITextHost_TxShowScrollBar(editor->texthost, wParam, lParam);
     return 0;
   }




More information about the wine-cvs mailing list