Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Set cursor position in a text box

davidgraham
Beginner
718 Views

I want to set the cursor position in a text box.

The default position appears to be at the start of the text, I want it at the end.

Thanks

0 Kudos
2 Replies
IanH
Honored Contributor II
718 Views

You can use the EM_SETSEL message to set the cursor location.  To set it to the end of the text in the control supply the length of text in the edit control (perhaps obtained using the WM_GETTEXTLENGTH message) for both wParam and lParam.

0 Kudos
davidgraham
Beginner
718 Views

Thank you

0 Kudos
Reply