woaidongmao

文章均收录自他人博客,但不喜标题前加-[转贴],因其丑陋,见谅!~
随笔 - 1469, 文章 - 0, 评论 - 661, 引用 - 0
数据加载中……

控制台下,SetTimer不起作用,转用:timeSetEvent

example:
//启动计时器
MMRESULT nIDTimerEvent = timeSetEvent(
  1000,//延时1秒
   0,
  TimeProc,
  0,
  (UINT)TIME_PERIODIC);
if( nIDTimerEvent == 0 )
  cout<<"启动计时器失败"<<endl;
//回调过程(时钟到来,回调函数被系统自动调用)
void CALLBACK TimeProc(
  UINT uID,      
  UINT uMsg,    
  DWORD dwUser,  
  DWORD dw1,    
  DWORD dw2      
)
{
  cout<<"时钟到来"<<endl;

 

====

posted on 2011-03-28 12:39 肥仔 阅读(1793) 评论(0)  编辑 收藏 引用 所属分类: Windows开发


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理