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.
This commit is contained in:
Dylan Smith 2009-02-24 02:37:21 -05:00 committed by Alexandre Julliard
parent b9b9835f93
commit a0466e2c0e
1 changed files with 4 additions and 2 deletions

View File

@ -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)
{