コントロールを削除します。
#Include <GuiListBox.au3>
_GUICtrlListBox_Destroy(ByRef $hWnd)
パラメータ
| $hWnd | コントロールのハンドル | 
返し値
成功: True、ハンドルが0に設定されます
注意
_GUICtrlListBox_Create関数で作成されたリストボックスのみに使用可能です。
関連
_GUICtrlListBox_Create
例
#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIListBox.au3>
#include <GuiConstantsEx.au3>
#include <Constants.au3>
Opt('MustDeclareVars', 1)
$Debug_LB = False ; ListBox関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用
_Main()
Func _Main()
    Local $hGUI, $hListBox
    ; GUIを作成
    $hGUI = GUICreate("(UDF Created) List Box Destroy", 400, 296)
    $hListBox = _GUICtrlListBox_Create($hGUI, "", 2, 2, 396, 296)
    GUISetState()
    ; ファイルを追加
    _GUICtrlListBox_BeginUpdate($hListBox)
    _GUICtrlListBox_ResetContent($hListBox)
    _GUICtrlListBox_InitStorage($hListBox, 100, 4096)
    _GUICtrlListBox_Dir($hListBox, @WindowsDir & "\win*.exe")
    _GUICtrlListBox_AddFile($hListBox, @WindowsDir & "\Notepad.exe")
    _GUICtrlListBox_Dir($hListBox, "", $DDL_DRIVES)
    _GUICtrlListBox_Dir($hListBox, "", $DDL_DRIVES, False)
    _GUICtrlListBox_EndUpdate($hListBox)
    MsgBox(4160, "Information", "Destroying ListBox")
    _GUICtrlListBox_Destroy($hListBox)
    
    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Main