#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiComboBox.au3>
#include <GuiComboBoxEx.au3>
#include <WinAPI.au3>
$Form1 = GUICreate("Form1", 623, 449)
$Combo1 = GUICtrlCreateCombo("Combo1", 88, 72, 329, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "trst|asfd")
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam);文本变化
Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo
$hWndFrom = $ilParam
$iIDFrom = BitAND($iwParam, 0xFFFF)
$iCode = BitShift($iwParam, 16)
;判断是否是 $Combo1 消息
If $hWndFrom <> GUICtrlGetHandle($Combo1) Then Return $GUI_RUNDEFMSG
If $iCode <> $CBN_EDITCHANGE Then Return $GUI_RUNDEFMSG;$CBN_EDITCHANGE 代表 $Combo1 文字发生改变
;=================================问题行:
_GUICtrlComboBox_ShowDropDown($Combo1, True);下拉后,鼠标消失了,如何不让鼠标消失?
;=================================问题行:
_WinAPI_UpdateWindow($Form1)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
是不是这样 |