RichEdit & EM_EXGETSEL
I have this text on my richeditor.
I'd like to add a command such "Add bold" to insert string, like this:
I know How to get the start and end chars with EM_EXGETSEL, but how to insert strings? :(
You could try using EM_EXSETSEL to set the selection so that it begins and ends at the place you want to insert text, and then use EM_SETTEXTEX to insert the text.
The procedure should be the same as with a regular edit control, except using EM_EXSETSEL instead of EM_SETSEL and EM_SETTEXTEX instead of EM_REPLACESEL.
Info on the EM_SETTEXTEX message: