UDF > GUI > GuiComboBox >


_GUICtrlComboBox_Destroy

Supprime un contr�le ComboBox

#include <GuiComboBox.au3>
_GUICtrlComboBox_Destroy ( ByRef $hWnd )

Param�tre

$hWnd ID/handle du contr�le

Valeur de retour

Succ�s: Retourne True, $hWnd est mis � 0.
�chec: Retourne False.

Remarque

La fonction est r�serv�e uniquement aux contr�les ComboBox cr��s avec _GUICtrlComboBox_Create().

En relation

_GUICtrlComboBox_Create

Exemple

#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