Function Reference


_GUICtrlEdit_EmptyUndoBuffer

Resets the undo flag of an edit control

#include <GuiEdit.au3>
_GUICtrlEdit_EmptyUndoBuffer ( $hWnd )

Parameters

$hWnd Control ID/Handle to the control

Return Value

None.

Remarks

The undo flag is automatically reset whenever the edit control receives a _GUICtrlEdit_SetText().

Related

_GUICtrlEdit_CanUndo, _GUICtrlEdit_Undo

Example

#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        Local $idEdit

        ; Create GUI
        GUICreate("Edit Empty Undo Buffer", 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?")

        MsgBox($MB_SYSTEMMODAL, "Information", "Can Undo: " & _GUICtrlEdit_CanUndo($idEdit))

        _GUICtrlEdit_EmptyUndoBuffer($idEdit)

        MsgBox($MB_SYSTEMMODAL, "Information", "Can Undo: " & _GUICtrlEdit_CanUndo($idEdit))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>Example