Ermittelt, ob es irgendwelche Aktionen in einem Edit-Control gibt, die rückgängig gemacht werden können
#include <GuiEdit.au3>
_GUICtrlEdit_CanUndo ( $hWnd )
$hWnd | Control-ID / Handle des Controls |
True: | Falls es Aktionen gibt die rückgängig gemacht werden können |
False: | Falls es keine Aktionen gibt |
Falls es Aktionen gibt, kann _GUICtrlEdit_Undo() aufgerufen werden um die Aktionen rückgängig zu machen
- - - - - - - - Erklärung der Controls - - - - - - - -
_GUICtrlEdit_EmptyUndoBuffer, _GUICtrlEdit_GetModify, _GUICtrlEdit_SetModify, _GUICtrlEdit_Undo
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idEdit
; Erstellt eine GUI
GUICreate("Edit: Undo aktivieren", 400, 300)
$idEdit = GUICtrlCreateEdit("Dies ist ein Test" & @CRLF & "Eine andere Zeile", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
MsgBox($MB_SYSTEMMODAL, "Information", "Undo aktivieren: " & _GUICtrlEdit_CanUndo($idEdit))
_GUICtrlEdit_AppendText($idEdit, @CRLF & "An das Ende anhängen?")
MsgBox($MB_SYSTEMMODAL, "Information", "Undo aktivieren: " & _GUICtrlEdit_CanUndo($idEdit))
; Die Schleife wiederholt sich, bis der Benutzer eine Beenden-Aktion auslöst
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example