An application sends an EM_SETSCROLLPOS message to tell the rich edit control to scroll to a particular point.
Syntax
To send this message, call the
SendMessage
function as follows.
lResult = SendMessage(
| // returns LRESULT in lResult
|
(HWND) hWndControl,
| // handle to destination control
|
(UINT) EM_SETSCROLLPOS,
| // message ID
|
(WPARAM) wParam,
| // = (WPARAM) () wParam; |
(LPARAM) lParam
| // = (LPARAM) () lParam; |
);
| |
Parameters
- wParam
-
This parameter is not used; it must be zero.
- lParam
-
Pointer to a POINT structure which specifies a point in the virtual text space of the document, expressed in pixels. The document will be scrolled until this point is located in the upper-left corner of the edit control window. If you want to change the view such that the upper left corner of the view is two lines down and one character in from the left edge. You would pass a point of (7, 22).
Microsoft Rich Edit checks the X and Y coordinates and adjusts them if necessary, so that a complete line is displayed at the top. It also ensures that the text is never completely scrolled off the view rectangle.
Return Value
This message always returns 1.
Message Information
Header | Declared in Richedit.h |
---|
Minimum operating systems |
Windows 95 with Rich Edit 3.0, Windows NT 4.0 with Rich Edit 3.0, Windows Millennium Edition, Windows 2000 |
---|
See Also
Rich Edit Controls, EM_GETSCROLLPOS