Quote:
An application sends an EM_SETSEL message to select a range of characters in an edit control.
EM_SETSEL
wParam = (WPARAM) (INT) nStart; // starting position
lParam = (LPARAM) (INT) nEnd; // ending position
Parameters
nStart
Value of wParam. Specifies the starting character position of the selection.
nEnd
Specifies the ending character position of the selection.
Return Values
This message does not return a value.
What you do is make both the starting and ending position the same and it will scroll the caret and screen to that position. This is what I have always used in the past.