开发者

Set Carret position in Text Field (Win32API)

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|


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜