删除控件
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_Destroy(ByRef $hWnd)
$hWnd | 控件的控件ID/句柄 |
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
$Debug_CB = False ;检查传递给 ComboBox/ComboBoxEx 函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
_Main()
Func _Main()
Local $hGUI, $hCombo
; 创建 GUI
$hGUI = GUICreate("ComboBoxEx Destroy", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGUI, "This is a test|Line 2", 2, 2, 394, 268)
GUISetState()
_GUICtrlComboBoxEx_AddString($hCombo, "Some More Text")
_GUICtrlComboBoxEx_InsertString($hCombo, "Inserted Text", 1)
;Destroy control
MsgBox(266256, "信息", "Destroy the control")
_GUICtrlComboBoxEx_Destroy($hCombo)
; 循环直到用户退出
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main