回复 34# heroxianf
刚 看了下GUIGetCursorInfo 直接用 $Info[3] 就可以了 不用ispressed
#include <GUIConstantsEx.au3>
#include <GuiComboBox.au3>
Local $hGUI = GUICreate("ComboBox", 300, 200)
Local $idComboBox1 = GUICtrlCreateCombo("test1", 10, 10, 185, 20, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST))
Local $idComboBox2 = GUICtrlCreateCombo("中文1", 10, 50, 185, 20, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST))
GUICtrlSetData($idComboBox1, "test2|test3|test4", "test4")
GUICtrlSetData($idComboBox2, "中文2|中文3|中文4", "中文4")
GUISetState(@SW_SHOW, $hGUI)
While 1
$Info = GUIGetCursorInfo($hGUI)
If $Info[4] = $idComboBox1 Or $Info[4] = $idComboBox2 And $Info[3] Then
;_GUICtrlComboBox_ShowDropDown($Info[4], True)
GUICtrlSetState($Info[4], $GUI_FOCUS)
EndIf
Switch GUIGetMsg()
Case -3
exit
EndSwitch
WEnd
GUIDelete($hGUI)
|