Share via


CEdit::EmptyUndoBuffer

voidEmptyUndoBuffer();

Remarks

Call this function to reset (clear) the undo flag of an edit control. The edit control will now be unable to undo the last operation. The undo flag is set whenever an operation within the edit control can be undone.

The undo flag is automatically cleared whenever the SetWindowText or SetHandleCWnd member functions are called.

For more information, see in the Win32 documentation.

Example

// The pointer to my edit.
extern CEdit* pmyEdit;

// Clear the undo buffer.
if (pmyEdit->CanUndo())
{
   pmyEdit->EmptyUndoBuffer();
   ASSERT(!pmyEdit->CanUndo());
}

CEdit OverviewClass MembersHierarchy Chart

See Also   CEdit::CanUndo, CEdit::SetHandle, CEdit::Undo, CWnd::SetWindowText