#include <windows.h>
void delay(long t)
{
MSG Msg;
long p = GetTickCount();
while (static_cast<long >(GetTickCount()-p)<=t)
{
if (PeekMessage(&Msg, null, 0, 0, PM_REMOVE))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
}
}
MFC实现延时功能不卡定时器
最新推荐文章于 2024-07-04 17:40:21 发布