Ermittelt die Anzahl von Items
#Include <GuiComboBox.au3>
_GUICtrlComboBox_GetCount($hWnd)
Parameter
| $hWnd | Handle des Controls |
Rückgabewert
Erfolg: Anzahl von Items
Bemerkungen
- - - - - - - - Erklärung der Controls - - - - - - - -
Verwandte Funktionen
Beispiel
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIComboBox.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 $hCombo
; Erstellt eine GUI
GUICreate("ComboBox: Ermittelt die Anzahl", 400, 296)
$hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
GUISetState()
; Fügt Dateien hinzu
_GUICtrlComboBox_BeginUpdate($hCombo)
_GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.exe")
_GUICtrlComboBox_EndUpdate($hCombo)
; Ermittelt die Anzahl
MsgBox(4160, "Information", "Anzahl: " & _GUICtrlComboBox_GetCount($hCombo))
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main