0

I'm making a dialog based text editor, using dev-c++. how can I insert text at the current cursor position? as in get the location of the cursor (not the mouse) and insert text at that point in the edittext control

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by tawes01
0

Thank you, that got me to a point where I can get the text and add text into it (insert). But how do you find where the cursor/typing thingy is? and is there a simpler method of doing this?

0

Figured it out:

SendMessage(GetDlgItem(hMainDlg, IDC_EDIT1), EM_REPLACESEL, 0, (LPARAM)text_to_insert);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.