Function Reference


_GUICtrlEdit_GetModify

Retrieves the state of an edit control's modification flag

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

Parameters

$hWnd Control ID/Handle to the control

Return Value

True: Edit control contents have been modified.
False: Edit control contents have not been modified.

Remarks

The system automatically clears the modification flag to zero when the control is created.
If the user changes the control's text, the system sets the flag to True.
You can call _GUICtrlEdit_SetModify() to set or clear the flag.

Related

_GUICtrlEdit_CanUndo, _GUICtrlEdit_SetModify, _GUICtrlEdit_Undo

Example

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

Example()

Func Example()
    Local $hStatusBar, $idEdit, $hGUI
    Local $sWow64 = ""
    If @AutoItX64 Then $sWow64 = "\Wow6432Node"
    Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\include\_ReadMe_.txt"
    Local $aPartRightSide[4] = [120, 248, 378, -1]

    ; Create GUI
    $hGUI = GUICreate("Edit Get Modify", 400, 300)
    $idEdit = GUICtrlCreateEdit("", 2, 2, 394, 268)
    $hStatusBar = _GUICtrlStatusBar_Create($hGUI, $aPartRightSide)
    _GUICtrlStatusBar_SetIcon($hStatusBar, 3, 97, "shell32.dll")
    GUISetState(@SW_SHOW)

    ; Set Margins
    _GUICtrlEdit_SetMargins($idEdit, BitOR($EC_LEFTMARGIN, $EC_RIGHTMARGIN), 10, 10)

    ; Add Text
    _GUICtrlEdit_AppendText($idEdit, FileRead($sFile))
    _GUICtrlEdit_LineScroll($idEdit, 0, _GUICtrlEdit_GetLineCount($idEdit) * -1)

    ; Get Modified Flag
    _GUICtrlStatusBar_SetText($hStatusBar, "Modified: " & _GUICtrlEdit_GetModify($idEdit), 2)

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