EM_CANUNDO

2.x

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

An application sends an EM_CANUNDO message to determine whether an edit-control operation can be undone.

Parameters

This message has no parameters.

Return Value

The return value is nonzero if the last edit operation can be undone, or it is zero if the last edit operation cannot be undone.

Example

This example sends an EM_CANUNDO message to determine whether the last edit-control operation can be undone and, if so, sends an EM_UNDO message to undo the last operation:

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

See Also

EM_UNDO