Help Center

CRichEditCtx.Scrollmethod

Scrolls the text vertically in a multiline rich edit control.

Windowsmethoddocumented

Syntax

FUNCTION Scroll (BYVAL nAction AS LONG) AS LONG

Parameters

NameDescription
nActionThe action the scroll bar is to take. This parameter can be one of the following values:
SB_LINEDOWN. Scrolls down one line.
SB_LINEUP. Scrolls up one line.
SB_PAGEDOWN. Scrolls down one page.
SB_PAGEUP. Scrolls up one page.

Return value

If the method is successful, the HIWORD of the return value is TRUE, and the LOWORD is the number of lines that the command scrolls. The number returned may not be the same as the actual number of lines scrolled if the scrolling moves to the beginning or the end of the text. If the nAction parameter specifies an invalid value, the return value is FALSE.

Description

Scrolls the text vertically in a multiline rich edit control.

Remarks

To scroll to a specific line or character position, use the LineScroll method. To scroll the caret into view, use the ScrollCaret method.

Reference

  • Defined in AfxNova/CRichEditCtx.inc:2887
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class