Поделиться через


CEdit::EmptyUndoBuffer

Call this function to reset (clear) the undo flag of an edit control.

void EmptyUndoBuffer( );

Заметки

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 SetHandle CWnd member functions are called.

For more information, see EM_EMPTYUNDOBUFFER in the Windows SDK.

Пример

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

Требования

Header: afxwin.h

См. также

Основные понятия

CEdit Class

CEdit Members

Hierarchy Chart

CEdit::CanUndo

CEdit::SetHandle

CEdit::Undo

CWnd::SetWindowText