The TextBox control supports the capability to undo changes, but there is no property or method that exposes this feature. You can achieve the same goal with a a set of messages. |
The EM_CANUNDO message returns a non-zero value if the contents of the TextBox control can undone. The EM_UNDO message actually undoes all changes:. The following code demonstrates how you can use these messages in a typical Edit menu: |
Finally, the EM_EMPTYUNDOBUFFER clears the internal undo buffer, so that the user can't undo changes. |
|