DWORD time1 = GetTickCount();
DWORD time2 = 0;
while(1)
{
time2 = GetTickCount();
if( time2-time1 >=20000 )
{
time1=GetTickCount();
...
}
}不知行不行
DWORD time2 = 0;
while(1)
{
time2 = GetTickCount();
if( time2-time1 >=20000 )
{
time1=GetTickCount();
...
}
}不知行不行
解决方案 »
- ChttpFile问题
- 请问各位用的VS2003,2005,2008之类的是英文版还是中文版的?
- 我想用MFC重绘一个圆形的按钮,背景带上图片,开发步骤应该是怎么样的呢!
- vc连接proc问题
- 关于域!
- post WM_CLOSE后,还不能彻底清空这个窗口占用的资源吗?
- com线程模式的一点疑问?
- 请问有熟悉dicom协议大虾能不能就worklist给点指点
- hook TerminateProcess()问题,请高手指点
- 哪里有免费的关于Vc++的电子书籍?谢谢!!!!
- *.iso和*.php分别是什么文件?怎么打开?
- 有谁知道VC中,如何得到邮件发送失败的原因,比如邮件地址写错等等。winsock可以实现吗?
能否说具体一点,给一个例子好吗?
HWND hWnd, // handle to window
UINT_PTR nIDEvent, // timer identifier
UINT uElapse, // time-out value => 设为20000毫秒
TIMERPROC lpTimerFunc // timer procedure
);
这是一个SDK编程中用TIMER的例子switch (Message)
{
case WM_INITDIALOG:
SetTimer(hDlg, // handle of window for timer messages
103, // timer identifier
500, // time-out value
(TIMERPROC)DlgProc // address of timer procedure
);
return(TRUE); case WM_TIMER:
KillTimer(hDlg,103);
EndDialog (hDlg, TRUE);
return (TRUE);
default:
return(FALSE);
}
CALLBACK
NoticeDlgProc(
HWND hDlg,
UINT Message,
WPARAM wParam,
LPARAM lParam)
{
switch (Message)
{
case WM_INITDIALOG:
SetTimer(hDlg, // handle of window for timer messages
103, // timer identifier
500, // time-out value
(TIMERPROC)DlgProc // address of timer procedure
);
return(TRUE); case WM_TIMER:
KillTimer(hDlg,103);
EndDialog (hDlg, TRUE);
return (TRUE);
default:
return(FALSE);
}
}