Ermittelt das Handle des Edit-Control Abschnitts eines ComboBoxEx Control
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_GetEditControl ( $hWnd )
$hWnd | Control-ID / Handle des Controls |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $hGui, $hImage, $hCombo
; Erstellt eine GUI
$hGui = GUICreate("ComboBoxEx: Ermittelt das Handle des Edit-Control", 500, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGui, "", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
$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($MB_SYSTEMMODAL, "Information", _
"Handle des Combo-Controls: " & _GUICtrlComboBoxEx_GetComboControl($hCombo) & @CRLF & _
"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 ;==>Example