c语言 timer

来源:互联网 发布:java poi读取excel文件 编辑:程序博客网 时间:2024/05/25 19:58

MMRESULT   timerId = timeSetEvent(11, 1, (LPTIMECALLBACK)OnTimeFunc, (DWORD)this, TIME_PERIODIC);



static void CALLBACK OnTimeFunc(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
WaterWaver * pThis = (WaterWaver*)dwUser;//由this指针获得实例的指针
pThis->OnMMTimer();
}




virtual void OnMMTimer()

{

timeKillEvent(timerId);

}

0 0
原创粉丝点击