删除 MonthCal 控件
#Include <GuiMonthCal.au3>
_GUICtrlMonthCal_Destroy(ByRef $hWnd)
$hWnd | 控件句柄 |
成功: | 返回 True, 句柄设置为 0 |
失败: | 返回 False |
#include <GUIConstantsEx.au3>
#include <GuiMonthCal.au3>
#include <WindowsConstants.au3>
$Debug_MC = False ; Check ClassName being passed to MonthCal functions, set to True and use a handle to another control to see it work
_Main()
Func _Main()
Local $hGUI, $HandleBefore, $hMonthCal
; 创建 GUI
$hGUI = GUICreate("Month Calendar Destroy", 400, 300)
$hMonthCal = _GUICtrlMonthCal_Create($hGUI, 4, 4, $WS_BORDER)
GUISetState()
$HandleBefore = $hMonthCal
MsgBox(4160, "信息", "Destroying the Control for Handle: " & $hMonthCal)
MsgBox(4160, "信息", "Control Destroyed: " & _GUICtrlMonthCal_Destroy($hMonthCal) & @LF & _
"Handel Before Destroy: " & $HandleBefore & @LF & _
"Handle After Destroy: " & $hMonthCal)
; 循环直到用户退出
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main