BCGSuite for MFC
virtual void CBCGPEditCtrl::AddUndoAction ( CString &  strText,
DWORD  dwAction,
int  nCurrOffset,
BOOL  bForceInsertMode,
BOOL  bForceNextUndo = FALSE 
)
virtual

Adds undo action to the undo buffer.

Called by the edit control when there is a need to add an undo action to the undo buffer. Currently, the following actions are stored in the undo buffer:

  • insert text or character
  • delete text or character
  • text indentation

There are following predefined action types:

  • g_dwUATUndefined = 0;
  • g_dwUATInsertData = 0x1;
  • g_dwUATDeleteData = 0x2;
  • g_dwUATIndentData = 0x4;
Parameters
strTextSpecifies the text to be stored in the undo buffer.
dwActionSpecifies the action code (action type).
nCurrOffsetSpecifies the current offset.
bForceInsertModeForces insert mode stored in the undo buffer. When undo is executed and the action marked as "insert mode" the text will be inserted (not overwritten) back in the edit control .
bForceNextUndoIf TRUE, this undo action is a part of a sequence of several undo actions. If FALSE, this undo action is a single undo action.