Use "SetTimer" API to create a new timer when you have create your window under "WinMain()" or any other place.
Then, you will get a message called "WM_TIMER" after each time that you specified.
So if you want to create a timer that sends the "WM_TIMER" message after each second, then it would look like this:
PHP Code:
SetTimer(winhwnd,1,1000,NULL);
/*winhwnd = handle of the window which will receive the WM_TIMER message*/
//1 = the timer ID
/*1000 = after the time in milliseconds,each time, you want to send a WM_TIMER message*/
/*NULL = if you want to have your own procedure for the timer then you can specify that here, otherwise, it will send your window a WM_TIMER message*/
//.................
//Received a WM_TIMER message
case WM_TIMER
MessageBox(NULL,"After every second","A",MB_OK);
//When we are done with the timer, we kill it using...
KillTimer(winhwnd, 1)
//1 = the timer ID
Hope that helps