评论会员:游客 时间:2012/02/06
CPallini:您可以使用此计时器。imgsrc=]
| mbue:你有这样做的:
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#pragma comment (lib,"user32.lib")
enum
{
INTERVAL = 2000, MAX_COUNT = 10,
};
void FAR PASCAL __fnTimer(HWND, UINT, UINT_PTR, DWORD)
{
static int count = MAX_COUNT;
if(0>=--count) PostQuitMessage(0);
Beep(3000,100);
}
int FAR PASCAL _tWinMain(HINSTANCE h,HINSTANCE p,LPTSTR c,int sw)
{
if(0<SetTimer(0,0,INTERVAL,__fnTimer))
{
for(MSG m;GetMessage(&m,0,0,0);DispatchMessage(&m));
}
return 0;
}
我以为特殊照顾使用Windows。
好运。sanathbt
评论会员:游客 时间:2012/02/06
?使用定时器,我怎么能叫我每一个指定的时间功能: