Commit 963407a9 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent f2898868
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment