得到关于指定组合框(ComboBox)的信息
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_GetComboBoxInfo($hWnd, ByRef $tInfo)
$hWnd | 控件的控件ID/句柄 |
$tInfo | 组合控件相关信息. |
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <Constants.au3>
$Debug_CB = False ;检查传递给 ComboBox/ComboBoxEx 函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
_Main()
Func _Main()
Local $hGUI, $tInfo, $hCombo
; 创建 GUI
$hGUI = GUICreate("ComboBoxEx Get ComboBox Info", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100)
GUISetState()
; 添加文件
_GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES, False)
_GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES)
_GUICtrlComboBoxEx_BeginUpdate($hCombo)
_GUICtrlComboBoxEx_AddDir($hCombo, @WindowsDir & "\*.exe")
_GUICtrlComboBoxEx_EndUpdate($hCombo)
If _GUICtrlComboBoxEx_GetComboBoxInfo($hCombo, $tInfo) Then _
MsgBox(4160, "信息", StringFormat("Edit Rect [%d][%d][%d][%d]", _
DllStructGetData($tInfo, "EditLeft"), DllStructGetData($tInfo, "EditTop"), _
DllStructGetData($tInfo, "EditRight"), DllStructGetData($tInfo, "EditBottom")))
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main