在一个函数中有如下语句
UINT_PTR uResult=SetTimer(NULL,NULL,100,CComm::DoTimer);
if(!uResult)printf("failed!\n");
else printf("**:%d\n",uResult);
响应函数定义
void CALLBACK CComm::DoTimer(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
int nSent;
printf("Hello!\n");
}
运行后函数DoTimer
一直没有运行
请问是怎么回事?
UINT_PTR uResult=SetTimer(NULL,NULL,100,CComm::DoTimer);
if(!uResult)printf("failed!\n");
else printf("**:%d\n",uResult);
响应函数定义
void CALLBACK CComm::DoTimer(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
int nSent;
printf("Hello!\n");
}
运行后函数DoTimer
一直没有运行
请问是怎么回事?
请说详细一点好吗?
一定给分!
^_^
2. 多媒体定时器. 到msdn查 timeSetEvent
3. 内核级定时器.到msdn查 CreateWaitableTimer