What GUI framework are you using? WinAPI? Something from Borland or MS? Something else?
A text widget (memo, edit field, etc) may have focus, but it also has a selection. Just setting the focus isn't enough. You must also set the selection, which is typically an index into the text and a (usually optional) character count.
you should be able to get the length of the text in the box currently and set the position to the end that way, if there isnt a direct function to do that. There should be some sort of cursor position or cursor location type value that you can set. This should not require a message (though you can do it that way).