1. Three keywords: settimer, killtimer, and wm_timer.
2. wm_timer is not an asynchronous message, so the timing cannot be accurate.
3. //////////////////////////////////////// //////////////////////////////////////// ///////////////////
// Send the timer message to the window
Settimer (hwnd, uinttimerid, UIMS, null );
Killtimer (hwnd, uinttimerid );
Wparam of the wm_timer message is equal to the ID of the Timer: uingtimerid
//////////////////////////////////////// //////////////////////////////////////// ///////////////////
// Process timer Message 1 through the callback function
Settimer (hwnd, uinttimerid, UIMS, timerproc );
Void callback timerproc (hwnd, uint message, uint itimerid, DWORD dwtime)
{
// Process your timerproc
}
//////////////////////////////////////// //////////////////////////////////////// ///////////////////
// Use the callback function to process timer Message 2
Itimerid = settimer (null, 0, UIMS, timerproc );
Void callback timerproc (hwnd, uint message, uint itimerid, DWORD dwtime)
{
// Process your timerproc
}