Peng Lv

毋意,毋必,毋固,毋我。 言必行,行必果。

导航

2011年10月4日 #

win32控制台程序中定时器的实现

摘要: 普通的win32程序中定时器的应用很多也很方便,但是在win32控制台中也是可以使用定时器的,利用的是windows程序的消息循环机制,如下:#include <iostream>#include <windows.h>using namespace std;void CALLBACK TimeProc( HWND hwnd, UINT message, UINT idTimer, DWORD dwTime){ cout<<"This is a timer."<<endl;}/* * 利用消息循环机制来实现定时器. */int 阅读全文

posted @ 2011-10-04 19:29 Lvpengms 阅读(1773) 评论(0) 推荐(0) 编辑