uhhhh, something about the caret....lemme look quick
ok, here's a combination of code that should be helpful, some taken from OST2, some taken from msdn:
k, so we've got a message that we can use for edit boxes (found from msdn here) called EM_SETSEL meaning Edit message set selection or something like that. Anyways, here's the parameters we need to send to it:
bla blah blah
lResult = SendMessage(
// returns LRESULT in lResult
// handle to destination control
// message ID
// = (WPARAM) () wParam;
// = (LPARAM) () lParam;
Ok, so we need to know the start and end position. You said you want the selection to be at the end? then we need to find the length of the edit box:
wParam Specifies the starting character position of the selection.
lParam Specifies the ending character position of the selection.
use this function/code
Where EditBox is an HWND to your editbox, duh.
So now we have the text size....here we go!
and tadah! We've got the position set. You might also need to dabble with the caret (not carrot) position if you have a mutltiline edit control:
This is easy to do, just use this message, like so:
and voila, it scrolls our caret (the little flashing line thingy) in to view automatically!
-hope that helps!