现在的位置: 首页 > 综合 > 正文

vc下的dalay函数实现

2013年08月23日 ⁄ 综合 ⁄ 共 291字 ⁄ 字号 评论关闭
DWORD   begintime=GetTickCount();  
  do  
  {  
      MSG                 msg;  
      if   (PeekMessage(&msg,   NULL,   0,   0,   PM_REMOVE))  
      {  
          TranslateMessage(&msg);//   Translates   virtual   key   codes  
          DispatchMessage(&msg);   //   Dispatches   message   to   window  
      }  
  }while(GetTickCount()<begintime+2000);//2秒=2000毫秒   
 

抱歉!评论已关闭.