From a0466e2c0eb25fc0c2c6db1fbcca00b42be1d941 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Tue, 24 Feb 2009 02:37:21 -0500 Subject: [PATCH] richedit: Don't show vertical scrollbar for single line controls. The vertical scrollbar is not shown when the ES_MULTILINE style isn't used, unless ES_DISBALENOSCROLL is also used. --- dlls/riched20/paint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 35ca097c920..f235082d7b5 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -1071,7 +1071,8 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y) bScrollBarIsVisible = (winStyle & WS_VSCROLL) != 0; bScrollBarWillBeVisible = (editor->nTotalLength > editor->sizeWindow.cy - && (editor->styleFlags & WS_VSCROLL)) + && (editor->styleFlags & WS_VSCROLL) + && (editor->styleFlags & ES_MULTILINE)) || (editor->styleFlags & ES_DISABLENOSCROLL); if (bScrollBarIsVisible != bScrollBarWillBeVisible) ITextHost_TxShowScrollBar(editor->texthost, SB_VERT, @@ -1174,7 +1175,8 @@ void ME_UpdateScrollBar(ME_TextEditor *editor) /* Update vertical scrollbar */ bScrollBarWasVisible = editor->vert_si.nMax > editor->vert_si.nPage; - bScrollBarWillBeVisible = editor->nTotalLength > editor->sizeWindow.cy; + bScrollBarWillBeVisible = editor->nTotalLength > editor->sizeWindow.cy && + (editor->styleFlags & ES_MULTILINE); if (editor->vert_si.nPos && !bScrollBarWillBeVisible) { -- 2.11.4.GIT