SetTimer(): Sets the time out interval between 1 msec to 50 days (approx.). For every time out, window proc receives a WM_TIMER message.
KillTimer(): Stops the timer message. It purges any pending WM_TIMER message in queue.
The Timer messages are not asynchronous. The WM_TIMER messages are queued in normal message queue. The window proc may miss a WM_TIMER message when it is busy. The time set though SetTimer() is not accurate since the resolution of time depends on hardware resolution.
There are two major methods to implement a timer.
1. SetTimer() to set the timer interval and processing the WM_TIMER in window proc.
2. SetTimer() to set the timer interval and attach a callback function to this timer. Now the WM_TIMER messages will be redirected to this callback function instead of window proc.