BCGControlBar Pro for MFC
virtual BOOL CBCGPEditCtrl::OnBeforeAddUndoAction ( BCGP_EDIT_UNDO_ACTION pUndoAction)

Called by the framework before an undo action is added to the undo buffer.

Should return FALSE if the undo action can be discarded; otherwise TRUE.

Override this function in a derived class to modify undo information or even discard the current undo action. You should discard undo actions with caution, because undo information is offset based. If you discard an action that was caused by text modification, the text won't be restored properly.

pUndoActionPoints to undo action to be added.