This documentation is archived and is not being maintained.

CEdit::Undo

Call this function to undo the last edit-control operation.

BOOL Undo( );

Return Value

For a single-line edit control, the return value is always nonzero. For a multiple-line edit control, the return value is nonzero if the undo operation is successful, or 0 if the undo operation fails.

Remarks

An undo operation can also be undone. For example, you can restore deleted text with the first call to Undo. As long as there is no intervening edit operation, you can remove the text again with a second call to Undo.

For more information, see EM_UNDO in the Platform SDK.

Example

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

// Undo the last operation, if possible.
if (pmyEdit->CanUndo())
   pmyEdit->Undo();

See Also

CEdit Overview | Class Members | Hierarchy Chart | CEdit::CanUndo

Show: