Undoes the last edit control operation in the control's undo queue
#include <GuiEdit.au3>
_GUICtrlEdit_Undo ( $hWnd )
$hWnd | Control ID/Handle to the control |
Success: | True. |
Failure: | False. |
An undo operation can also be undone.
For example, you can restore deleted text with the first _GUICtrlEdit_Undo(), and remove the text again with a second _GUICtrlEdit_Undo() as long as there is no intervening edit operation.
_GUICtrlEdit_CanUndo, _GUICtrlEdit_EmptyUndoBuffer, _GUICtrlEdit_GetModify
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idEdit
; Create GUI
GUICreate("Edit Undo", 400, 300)
$idEdit = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
_GUICtrlEdit_AppendText($idEdit, @CRLF & "Append to the end?")
; Undo
MsgBox($MB_SYSTEMMODAL, "Information", "Undo")
_GUICtrlEdit_Undo($idEdit)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example