回复 5# tcpuuu
#include <WindowsConstants.au3>
#include <EditConstants.au3>
Const $UDM_SETACCEL = $WM_USER + 107
Local $nSec[4] = ["", 0, 2, 5], $nChg[4] = ["", 100, 500, 2000]
Local $str = "uint;uint;uint;uint;uint;uint"
Local $AccelStruct = DllStructCreate($str )
For $i = 1 To 3
DllStructSetData($AccelStruct, ($i * 2) - 1, $nSec[$i])
DllStructSetData($AccelStruct, ($i * 2), $nChg[$i])
Next
GUICreate('Updown', 200, 180, 1, 1)
$input = GUICtrlCreateInput("7200", 10, 10, 80, 22, 0x01)
GUICtrlSetFont($input, 12)
$updown = GUICtrlCreateUpdown($input)
GUICtrlSendMsg($updown, $UDM_SETACCEL, 3, DllStructGetPtr ($AccelStruct))
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
EndSwitch
WEnd
|