# Function Reference

# _GUICtrlComboBox_Destroy

Delete the control

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

## Parameters

$hWnd | Control ID/Handle to the control

## Return Value

Success: | True, $hWnd is set to 0.
Failure: | False.

## Remarks

Restricted to only be used on ComboBox controls created with _GUICtrlComboBox_Create().

## Related

_GUICtrlComboBox_Create

## Example

    #include <DirConstants.au3>
    #include <GuiComboBox.au3>
    #include <GUIConstantsEx.au3>
    #include <MsgBoxConstants.au3>

    Example()

    Func Example()
        Local $hGUI, $hCombo

        ; Create GUI
        $hGUI = GUICreate("(UDF Created) ComboBox Destroy", 400, 296)
        $hCombo = _GUICtrlComboBox_Create($hGUI, "", 2, 2, 396, 296)
        GUISetState(@SW_SHOW)

        ; Add files
        _GUICtrlComboBox_BeginUpdate($hCombo)
        _GUICtrlComboBox_AddDir($hCombo, "", $DDL_DRIVES, False)
        _GUICtrlComboBox_EndUpdate($hCombo)

        ; Destroy ComboBox
        MsgBox($MB_SYSTEMMODAL, "Information", "Destroy ComboBox")
        MsgBox($MB_SYSTEMMODAL, "Information", "Destroyed: " & _GUICtrlComboBox_Destroy($hCombo))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
    EndFunc   ;==>Example