BCGControlBar Pro for MFC
virtual DWORD CBCGPEditCtrl::GetLastUndoReason ( ) const
inlinevirtual

Retrieves the last undo reason.

Returns

One or combination of the following values: Action types:

  • g_dwUATUndefined: unknown type
  • g_dwUATInsertData: data inserted
  • g_dwUATDeleteData: data deleted
  • g_dwUATIndentData: indentation

Action reasons (more exact types):

  • g_dwUATTyping: typing
  • g_dwUATCut: cut
  • g_dwUATPaste: paste
  • g_dwUATDelete: delete
  • g_dwUATBackspace: backspace
  • g_dwUATDragDrop: drag & drop
  • g_dwUATEnter: new line (return key)
  • g_dwUATIndent: forward indentation
  • g_dwUATUnindent: backward indentation
  • g_dwUATTab: tabulation

Call this method to retrieve the last undo reason. Every time the text in the edit control is changed, the new undo action is added in the undo buffer. Actually, the undo reason indicates the last action that was performed.