Supprime un contrôle ComboBox
#include <GuiComboBox.au3>
_GUICtrlComboBox_Destroy ( ByRef $hWnd )
$hWnd | ID/handle du contrôle |
Succès: | Retourne True, $hWnd est mis à 0. |
Échec: | Retourne False. |
La fonction est réservée uniquement aux contrôles ComboBox créés avec _GUICtrlComboBox_Create().
#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI, $hCombo ; Crée une GUI $hGUI = GUICreate("(UDF Created) ComboBox Destroy", 400, 296) $hCombo = _GUICtrlComboBox_Create($hGUI, "", 2, 2, 396, 296) GUISetState(@SW_SHOW) ; Ajoute des fichiers _GUICtrlComboBox_BeginUpdate($hCombo) _GUICtrlComboBox_AddDir($hCombo, "", $DDL_DRIVES, False) _GUICtrlComboBox_EndUpdate($hCombo) ; Supprime la ComboBox MsgBox($MB_SYSTEMMODAL, "Information", "Destroy ComboBox") MsgBox($MB_SYSTEMMODAL, "Information", "Destroyed: " & _GUICtrlComboBox_Destroy($hCombo)) ; Boucle jusqu'à ce que l'utilisateur quitte Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example