| |
|
|
 Frank Abbing | KompilierenMarcaSeparaciónSimple TimerProc
Frank Abbing
DEF SetATimer(4) !USER32,SetTimer
DEF KillATimer(2) !USER32,KillTimer
DEF GetTimeFormat(6) !KERNEL32,GetTimeFormatA
Proc timerproc
Declare text$
text$=Space$(20)
GetTimeFormat(0,0,0,0,Addr(text$),20)
text$=Uhrzeit: +text$
SetText %hwnd,text$
EndProc
Cls
SetATimer(%hwnd,1,1000,ProcAddr(timerproc,0))
Whileloop 20000
Print Int(Rnd(100000))
EndWhile
Print
Demo Ende.
Waitinput
KillATimer(%hwnd,1)
End
|
|
|
| |
|
|
|
 Jac de Lad | Man debería anmerken, dass el profane SetTimer ya el Temporizador 1 de %hWnd belegt. |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 05.06.2008 ▲ |
|
|
|
|
 | Man debería anmerken el una Aufruf de SetATimer(%hwnd,1,1000,ProcAddr(timerproc,0)) unheimlich gefährlich ser kann y eigentlich necesariamente a vermeiden es.
Was en efecto kein Problema mehr es, dank el subClassProc... 
Der letzte Parámetro en lugar de procAddr() simplemente una Null y el wm_timer-Abfrage en el subClassProc y uno es en el sicheren Página.
Und wer glaubt el uno así no el selbe Ergebnis erzeugen kann se se simplemente por ejemplo Buntank [...] angucken. |
|
|
| |
|
|