|
| What is right place to kill timer that was created after receiving
WM_CREATE message for the window. TimerCallback is called at regular
timer intervals used in SetTimer().
WatchDogTimer = SetTimer(SharedData->g_hWnd, MY_WATCH_DOG_TIMER_ID,
WATCH_DOG_TIMEOUT, WatchDogTimerCallback);
I tried to call KillTimer before calling DestroyWindow(). Killtimer
returns error "message pending in queue". I tried to kill timer after
receiving WM_DESTROY. KillTimer then returns error = 2(file not
found). So tried to call KillTimer after quiting windows message loop
and it returns error 1440 = Invalid window handle. I didn't understand
where I should call Killtimer. I
Is it I should call only in Timer callback?
if(KillTimer(SharedData->g_hWnd, MY_WATCH_DOG_TIMER_ID) == 0)
{
Print("\n KillWatchDogTimer returns %ld \n",GetLastError());
}
Thanks.
|
|