Function Reference

_GUICtrlEdit_Destroy

エディットコントロールを削除します。

#Include <GuiEdit.au3>
_GUICtrlEdit_Destroy(ByRef $hWnd)

 

パラメータ

$hWnd コントロールのハンドル

 

返し値

成功: True、ハンドルが0に設定されます
失敗: False

 

注意

_GUICtrlEdit_Createで作成されたエディットにのみ使用できます。

 

関連

_GUICtrlEdit_Create

 


#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiEdit.au3>
#include <GuiConstantsEx.au3>

Opt('MustDeclareVars', 1)

$Debug_Ed = False ; Edit関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

_Main()

Func _Main()
    Local $hGUI, $hEdit

    ; GUIを作成
    $hGUI = GUICreate("Edit Destroy", 400, 300)
    $hEdit = _GUICtrlEdit_Create($hGUI, "This is a test" & @CRLF & "Another Line", 2, 2, 394, 268)
    GUISetState()

    _GUICtrlEdit_AppendText($hEdit, @CRLF & "Append to the end?")
   
    MsgBox(4160, "Information", "Destroy Edit Control")
    _GUICtrlEdit_Destroy($hEdit)
   
    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main