Determines whether there are any actions in an edit control's undo queue
#include <GuiEdit.au3>
_GUICtrlEdit_CanUndo ( $hWnd )
$hWnd | Control ID/Handle to the control |
True: | If there are actions in the control's undo queue. |
False: | If the undo queue is empty. |
If the undo queue is not empty, you can call the _GUICtrlEdit_Undo() to undo the most recent operation.
_GUICtrlEdit_EmptyUndoBuffer, _GUICtrlEdit_GetModify, _GUICtrlEdit_SetModify, _GUICtrlEdit_Undo
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idEdit
; Create GUI
GUICreate("Edit Can Undo", 400, 300)
$idEdit = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
MsgBox($MB_SYSTEMMODAL, "Information", "Can Undo: " & _GUICtrlEdit_CanUndo($idEdit))
_GUICtrlEdit_AppendText($idEdit, @CRLF & "Append to the end?")
MsgBox($MB_SYSTEMMODAL, "Information", "Can Undo: " & _GUICtrlEdit_CanUndo($idEdit))
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example