Cita de: Hasseds en 28 Agosto 2011, 00:38 AM
PD: es mas practico guardar el retorno de SetTimer para luego utilizarlo con KillTimer pero este Por Ej con este hwnd tambien se puede , lo dicho ( voy a investigar que utilidad puede tener)
Es una ventana oculta que resive TODOS los mensajes del sistema operativo... para evitarnos hacer el trato de los mensajes mismos tal y como lo hariamos en C/C++...
P.D.: El hwnd en el SetTimer() y KilTtimer() son solo para relacionar el mensaje WM_TIMER con un CallBack al WinProc() de la ventana X con respecto a su hwnd... de todos modos en todos los codigos ya espuestos aqui se a guardado el uIDEvent generado por SetTimer() para posteriormente usarlo en el KillTimer()...
Cita de: MSDN_Microsoft http://msdn.microsoft.com/en-us/library/ms644906(v=vs.85).aspx
Remarks
An application can process WM_TIMER messages by including a WM_TIMER case statement in the window procedure or by specifying a TimerProc callback function when creating the timer. When you specify a TimerProc callback function, the default window procedure calls the callback function when it processes WM_TIMER. Therefore, you need to dispatch messages in the calling thread, even when you use TimerProc instead of processing WM_TIMER.
The wParam parameter of the WM_TIMER message contains the value of the nIDEvent parameter.
The timer identifier, nIDEvent, is specific to the associated window. Another window can have its own timer which has the same identifier as a timer owned by another window. The timers are distinct.
SetTimer can reuse timer IDs in the case where hWnd is NULL.
Dulces Lunas!¡.