#include "windows.h"
#include <iostream>
using namespace std;
void CALLBACK TimeProc(
HWND hwnd,
UINT message,
UINT idTimer,
DWORD dwTime);
int _tmain(int argc, _TCHAR* argv[])
{
SetTimer(NULL,1,1000,TimeProc);
MSG msg;
while(GetMessage(&msg,NULL,0,0))
{
if(msg.message==WM_TIMER)
{
DispatchMessage(&msg);
}
}
scanf(&a);
return 0;
}
void CALLBACK TimeProc(
HWND hwnd,
UINT message,
UINT idTimer,
DWORD dwTime)
{
cout<<"a timer comming"<<endl;
}