I am trying to manipulate caret position in an edit control using Winapi SetCaretPos() function. When the user clicks on a button, the caret in the edit box advances a certain number of pixels forward(its like inserting a blank automatically). Till here everything goes fine, and the caret blinks at its new position, but when I try to write anything in the edit box now, it goes back to the previous place before the automatic space. Any suggestions on how can I skip certain space in edit box?
A few lines of code:
The caret flashes at the right position, but I am not able to write at that position.
GetCaretPos(&Cursor_Pos); //Cursor_Pos is of type LPPOINT
SetCaretPos(Cursor_Pos.x + 50,Cursor_Pos.y);