Prev Next

WM_TIMER Overview  Group

The WM_TIMER message is posted to the installing thread’s message queue when a timer expires. You can process the message by providing a WM_TIMER case in the window procedure. Otherwise, the default window procedure will call the TimerProc callback function specified in the call to the SetTimer function used to install the timer.

WM_TIMER 

wTimerID = wParam;             // timer identifier 

tmprc = (TIMERPROC *) lParam;  // address of timer callback 

 

Parameters

wTimerID
Value of wParam. Specifies the timer identifier.
tmprc
Value of lParam. Points to an application-defined callback function that was passed to the SetTimer function when the timer was installed.

Return Values

An application should return zero if it processes this message.

Remarks

The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions retrieve this message only when no other higher-priority messages are in the thread’s message queue.

See Also

GetMessage, PeekMessage, SetTimer, TimerProc