richedit: Updated internal style flags on EM_SHOWSCROLLBAR.

Dylan Smith dylan.ah.smith at gmail.com
Wed Jan 28 00:35:06 CST 2009


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(-)
-------------- next part --------------
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index b3f92bf..9109a00 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-patches mailing list