Article # 45, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Setting the undo context.
Question: I recently changed my program from multiple-document interface to single-document interface. When I open a document, everything works fine. When I close that document and open a second one, the Undo no longer works. What gives? (I'm using a text object for the document.) Answer: For some reason, the text object is being told to not send undo messages to the EditControl. To fix this, in your MSG_META_DOC_OUTPUT_ATTACH_UI_TO_DOCUMENT method (or wherever is appropriate for your program), send the message @send textObj::MSG_VIS_TEXT_SET_FEATURES( VTF_ALLOW_UNDO, 0 ); This will make the text object turn on its undo support.