Dylan Smith : richedit: EM_SHOWSCROLLBAR hides scrollbars for less than page of text.
Alexandre Julliard
julliard at winehq.org
Tue Feb 24 10:21:28 CST 2009
Module: wine
Branch: master
Commit: 963407a9ef315e42efd6fa9b74cfe564077f161f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=963407a9ef315e42efd6fa9b74cfe564077f161f
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Tue Feb 24 02:39:03 2009 -0500
richedit: EM_SHOWSCROLLBAR hides scrollbars for less than page of text.
When all the text fits on the screen, the scrollbars are not shown from
EM_SHOWSCROLLBAR. The message instead adds support for the specified
scrollbar when lParam is TRUE, so that the scrollbar will be shown when
sufficient text is in the document.
---
dlls/riched20/editor.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 8af973c..4bfc9c2 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3156,12 +3156,18 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
return 0;
}
- if (lParam)
+ if (lParam) {
editor->styleFlags |= flags;
- else
- editor->styleFlags &= flags;
-
- ITextHost_TxShowScrollBar(editor->texthost, wParam, lParam);
+ if (flags & WS_HSCROLL)
+ ITextHost_TxShowScrollBar(editor->texthost, SB_HORZ,
+ editor->nTotalWidth > editor->sizeWindow.cx);
+ if (flags & WS_VSCROLL)
+ ITextHost_TxShowScrollBar(editor->texthost, SB_VERT,
+ editor->nTotalLength > editor->sizeWindow.cy);
+ } else {
+ editor->styleFlags &= ~flags;
+ ITextHost_TxShowScrollBar(editor->texthost, wParam, FALSE);
+ }
return 0;
}
case EM_SETTEXTEX:
More information about the wine-cvs
mailing list