I’v created a text box and when it gets focus it sets the caret position to 0 rather than the end. I want to set it to the end.
Thanks
|Text Here -> Text Here|
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The caret position is basically the same as the current selection — when the beginning and end are at different positions, you have some text selected. If the beginning and end of selection are at the same place, that’s the caret position.
You can set the selection with
EM_SETSEL. To put it at the end, use -1 for both the beginning and end of selection.