1.SetTimer (Hwnd,uint,uint,timerproc); The first parameter is set to capture the window handle of the timed message, the second parameter is the timer's ID, the third is the timing length in milliseconds, the last parameter is set to NULL, You can make the window's callback function handle the WM_TIMER message. In general, the SetTimer call is made when the window is created, and the wm_timer response is added to the callback function. Then the window is destroyed when the timer is destroyed: KillTimer (hwnd,uint), the parameters are window handle and timer ID respectively.
2.SetTimer (Hwnd,uint,uint,timerproc); the only difference from the first method is that the last parameter is not NULL, but rather a callback function that is defined by itself, so that the WM_TIMER message is fetched and processed by its own defined callback function. The same should be done at the end of the use of KillTimer (Hwnd,uint);
3.IDtimer = SetTimer (Hwnd,uint,uint,timerproc); Set the first parameter to NULL, the second parameter to 0, and the third and fourth parameters in line with the second method, so that creating a timer returns a timer ID. Called KillTimer (Null,idtimer) when the timer is destroyed. This method is suitable for many times the timing is easy to confuse the timer ID of the program, because its return value management Timer ID, and do not manage
3 usage of the WIN32 API timer