这类问题一般都可以在MSDN上找到的,http://msdn.microsoft.com/en-us/library/ms725498.aspx
楼主依自己的需求自己改下吧~
#include <winAPI.au3>
If not IsDeclared("WM_TIMECHANGE") Then $WM_TIMECHANGE=0x001e
$hGui = GuiCreate("Test Of WM_TIMECHANGE", 400, 300)
GUISetState()
;$btnTest = GuiCtrlCreateButton("Test", 100, 100, 70, 20)
$tcProc = DllCallbackRegister("_tcProc", "int", "hwnd;uint;wparam;lparam")
$pTcProc = DllCallbackGetPtr($tcProc)
$tcOldProc = _WinAPI_SetWindowLong($hGUI, -4, $pTcProc)
while True
If GuiGetMsg() = -3 then ExitLoop
WEnd
Func _tcProc($hWnd, $msg, $wParam, $lParam)
;consoleWrite("TIMECHANGE")
If $msg = $WM_TIMECHANGE then
msgbox(0, '', "time change")
return 0
EndIf
return _winAPI_CallWindowProc($tcOldProc, $hWnd, $msg, $wParam, $lParam)
EndFunc ;==>_tcProc()
[ 本帖最后由 pusofalse 于 2009-3-7 01:11 编辑 ] |