EM_UNDO

2.x

EM_UNDO
wParam = 0;     /* not used, must be zero */
lParam = 0L;    /* not used, must be zero */

An application sends an EM_UNDO message to undo the last edit-control operation.

Parameters

This message has no parameters.

Return Value

The return value is always nonzero for a single-line edit control. For a multiline edit control, the return value is nonzero if the undo operation is successful or zero if the undo operation fails.

Comments

An undo operation can also be undone. For example, you can restore deleted text with the first EM_UNDO message and remove the text again with a second EM_UNDO message as long as there is no intervening edit-control operation.

Example

This example undoes the last edit-control operation:

SendDlgItemMessage(hdlg, ID_MYEDITCONTROL, EM_UNDO, 0, 0L);

See Also

EM_CANUNDO