BCGSoft Professional Editor for MFC
virtual void CBCGPEditCtrl::AddUndoAction ( TCHAR  ch,
DWORD  dwAction,
int  nCurrOffset,
BOOL  bForceInsertMode 
)
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
chSpecifies the character 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 .