首页 > 其他 > 详细

防止界面卡顿

时间:2015-07-09 17:32:05      阅读:218      评论:0      收藏:0      [点我收藏+]
void DoEvents()
{
    MSG msg;
    // Process existing messages in the application‘s message queue.
    // When the queue is empty, do clean up and return.
    while (::PeekMessage(&msg,NULL,0,0,PM_NOREMOVE))
    {
        if (!AfxGetThread()->PumpMessage())
            return;
    }
}

void Delay(DWORD time)
{
    DWORD t=::GetTickCount();
    while(::GetTickCount() -t < time)
    {
        DoEvents();
    }
}

 

防止界面卡顿

原文:http://www.cnblogs.com/profession/p/4633571.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!