EM_CANUNDO message

Determines whether there are any actions in an edit control's undo queue. You can send this message to either an edit control or a rich edit control.



Not used; must be zero.


Not used; must be zero.

Return value

If there are actions in the control's undo queue, the return value is nonzero.

If the undo queue is empty, the return value is zero.


If the undo queue is not empty, you can send the EM_UNDO message to the control to undo the most recent operation.

Edit controls and Rich Edit 1.0: The undo queue contains only the most recent operation.

Rich Edit 2.0 and later: The undo queue can contain multiple operations.

Rich Edit: Supported in Microsoft Rich Edit 1.0 and later. For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.


Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Winuser.h (include Windows.h)

See also