CRichEditCtrl::EmptyUndoBuffer
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

CRichEditCtrl::EmptyUndoBuffer 

Resets (clear) the undo flag of this rich edit control.


void EmptyUndoBuffer( );

The control will now be unable to undo the last editing operation. The undo flag is set whenever an operation within the rich edit control can be undone.

The undo flag is automatically cleared whenever you call the CWnd member function SetWindowText.

For more information, see EM_EMPTYUNDOBUFFER in the Platform SDK.

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;

// Clear the undo buffer.
if (pmyRichEditCtrl->CanUndo())
{
   pmyRichEditCtrl->EmptyUndoBuffer();
   ASSERT(!pmyRichEditCtrl->CanUndo());
}
Show:
© 2016 Microsoft