You need to use SetSel() to position the caret. Basically, when you select an area within an edit control, the caret moves to the end of the selected position. For example, if you want to move the caret in position 2 of the edit field, you would call CEdit::SetSel(2,2)

You may have to play around with this function a little. I've seen some quirkiness in the way it works. It's a backdoor way of setting the cursor position, but it does work.

Regards,

Paul McKenzie