Platform SDK: Windows User Interface

EM_SCROLL

The EM_SCROLL message scrolls the text vertically in a multiline edit control. This message is equivalent to sending a WM_VSCROLL message to the edit control. You can send this message to either an edit control or a rich edit control.

To send this message, call the SendMessage function with the following parameters.

SendMessage( 
  (HWND) hWnd,              // handle to destination window 
  EM_SCROLL,                // message to send
  (WPARAM) wParam,          // scroll action
  (LPARAM) lParam          // not used; must be zero
);

Parameters

wParam
Specifies the action the scroll bar is to take. This parameter can be one of the following values.
Value Meaning
SB_LINEDOWN Scrolls down one line.
SB_LINEUP Scrolls up one line.
SB_PAGEDOWN Scrolls down one page.
SB_PAGEUP Scrolls up one page.

lParam
This parameter is not used.

Return Values

If the message is successful, the high-order word of the return value is TRUE, and the low-order word 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 wParam parameter specifies an invalid value, the return value is FALSE.

Remarks

To scroll to a specific line or character position, use the EM_LINESCROLL message. To scroll the caret into view, use the EM_SCROLLCARET message.

Rich Edit: For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Version: Requires Also in Rich Edit 1.0 or later.
  Header: Declared in Winuser.h; include Windows.h.

See Also

Edit Controls Overview, Edit Control Messages, EM_LINESCROLL, EM_SCROLLCARET, WM_VSCROLL