Platform SDK: Windows User Interface |
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 );
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. |
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.
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.
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.
Edit Controls Overview, Edit Control Messages, EM_LINESCROLL, EM_SCROLLCARET, WM_VSCROLL