本帖最后由 wjscxs 于 2010-6-11 17:53 编辑 #Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIComboBox.au3>
#Region ### START Koda GUI section ### Form=
$Form = GUICreate("", 441, 278, @DesktopWidth-460, -5)
$nian = _GUICtrlComboBox_Create($Form,"", 63, 7, 48, 25)
_GUICtrlComboBox_BeginUpdate($nian)
for $i =0 to 148
_GUICtrlComboBox_AddString($nian,$i+1901)
Next
_GUICtrlComboBox_SetEditText($nian,@YEAR)
_GUICtrlComboBox_EndUpdate($nian)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUIRegisterMsg($WM_COMMAND,"combo_edit")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
func combo_edit($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg
Local $hWndFrom,$iCode
$hWndFrom = $ilParam
;$iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
$iCode = BitShift($iwParam, 16) ; Hi Word
Switch $hWndFrom
Case $nian
Switch $iCode
Case $CBN_SELCHANGE
MsgBox(1,"",_GUICtrlComboBox_GetEditText($nian))
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
看到没,那个msgbox(MsgBox(1,"",_GUICtrlComboBox_GetEditText($nian)))有没办法让它显示combo选择后的值,(不是选择前的值) |