Funktionsreferenz

_GUICtrlComboBoxEx_GetComboControl

Ermittelt das Handle des Unter-Combobox Controls.

#Include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_GetComboControl($hWnd)

 

Parameter

$hWnd Handle des Controls

 

Rückgabewert

Erfolg: Handle zu dem Combobox Control innerhalb dem ComboBoxEx-Control

 

Bemerkungen

- - - - - - - - Erklärung der Controls - - - - - - - -

 

Verwandte Funktionen

 

Beispiel


#include <GuiComboBoxEx.au3>
#include <GuiImageList.au3>
#include <GuiConstantsEx.au3>

Opt('MustDeclareVars', 1)

$Debug_CB = False ; Prüft den Klassennamen (ClassName), der an die ComboBox/ComboBoxEx-Funktion übergeben wird. Setze dies versuchsweise auf True und verwende dann ein Handle zu einem anderen Control, um die Funktionsweise zu verstehen.

_Main()

Func _Main()
    Local $hGUI, $hImage, $hCombo

    ; Erstellt eine GUI
    $hGUI = GUICreate("ComboBoxEx: Ermittelt das Handle des Combo-Controls", 500, 300)
    $hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 268)
    GUISetState()

    $hImage = _GUIImageList_Create(16, 16, 5, 3)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 110)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 131)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 165)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 168)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 137)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 146)
    _GUICtrlComboBoxEx_SetImageList($hCombo, $hImage)

    For $x = 0 To 5
        _GUICtrlComboBoxEx_AddString($hCombo, StringFormat("%03d : Zufallstring", Random(1, 100, 1)), $x)
    Next

    MsgBox(4160, "Information", _
            "Handle des Combo-Controls: " & _GUICtrlComboBoxEx_GetComboControl($hCombo) & @LF & _
            "Handle des Edit-Controls: " & _GUICtrlComboBoxEx_GetEditControl($hCombo))

    ; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Main