69,373
社区成员
发帖
与我相关
我的任务
分享
VOID CALLBACK myFunc(
HWND hwnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
)
{
cerr <<"rabbit , I love you!\n"<<endl;
}
UINT interTime = 1000;
MSG msg;
int send = SetTimer(NULL,NULL, interTime,(TIMERPROC)myFunc);
while (GetMessage (&msg, NULL, 0, 0))
{
if(msg.message == WM_TIMER)
{
cout<<"WM_TIMER" << endl;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
KillTimer(NULL, send);