example:
//启动计时器
MMRESULT nIDTimerEvent = timeSetEvent(
1000,//延时1秒
0,
TimeProc,
0,
(UINT)TIME_PERIODIC);
if( nIDTimerEvent == 0 )
cout<<"启动计时器失败"<<endl;
//回调过程(时钟到来,回调函数被系统自动调用)
void CALLBACK TimeProc(
UINT uID,
UINT uMsg,
DWORD dwUser,
DWORD dw1,
DWORD dw2
)
{
cout<<"时钟到来"<<endl;
}
====