Function Reference

_GUICtrlDTP_Destroy

コントロールを削除します。

#Include <GuiDateTimePicker.au3>
_GUICtrlDTP_Destroy(ByRef $hWnd)

 

パラメータ

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

 

返し値

成功: True、ハンドルをゼロに設定します
失敗: False

 

注意

_GUICtrlDTP_Createで作成された日付時刻ピッカーのみに使用できます。

 

関連

_GUICtrlDTP_Create

 


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

Opt('MustDeclareVars', 1)

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

_Main()

Func _Main()
    Local $hGUI, $HandleBefore, $hDTP

    ; GUIを作成
    $hGUI = GUICreate("(UDF Created) DateTimePick Destroy", 400, 300)
    $hDTP = _GUICtrlDTP_Create($hGUI, 2, 6, 190)
    GUISetState()

    MsgBox(4160, "Information", "Destroying the Control for Handle: " & $hDTP)
    $HandleBefore = $hDTP
    MsgBox(4160, "Information", "Control Destroyed: " & _GUICtrlDTP_Destroy($hDTP) & @LF & _
            "Handel Before Destroy: " & $HandleBefore & @LF & _
            "Handle After Destroy: " & $hDTP)

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main