We use Richedit 2.0 for our script editor, which has automatic multi-level undo and redo for when you type. When we want to build our script or when the script opens, I reformat the text and send it to the rich edit control by WM_SETTEXT. This clears the undo buffer.
How can I get it so that after reformatting my script I can still press CTRL-Z and it will go back to the previous text, and previous undos before that, before I did the reformat ? I don't know how richedit saves the undos, but all it would seem to need is a way of not clearing the undo buffer when I do the WM_SETTEXT, and storing an undo point before I do that. Is this possible ?
Thanks
Shaun Southern