UINT SetTimer(
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
)其中,lpTimerFunc如何通过回调函数
VOID CALLBACK TimerProc(
HWND hwnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
)
来取得???
现在我的这个参数不能为NULL,我不想让应用程序来接收这个WM_TIMER消息。
谢谢!!
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
)其中,lpTimerFunc如何通过回调函数
VOID CALLBACK TimerProc(
HWND hwnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
)
来取得???
现在我的这个参数不能为NULL,我不想让应用程序来接收这个WM_TIMER消息。
谢谢!!
解决方案 »
- VC的增量编译
- 用socket下载网页,下载下来除了响应码正常,其他内容都乱码,怎么回事
- 你可能也不会的问题 找了很久找不到 ************************************************\r\n你可能也不会的问题 找了很久找不到
- 为啥进度条的指示条在循环stepIt()完毕后,自动消失了?我要让它处于占满状态
- 快毕业了,做程序员还是公务员呢,大家给个参考
- 编译问题
- 如果你认为自己编程还可以,那就试一下(三)
- 笔试题,全答出来年薪20万
- Windows 系统服务的信息输出
- error LNK2001
- 如何在开发中期加入对数据库的支持?
- 请教:程序中用双缓存显示图象没有结果?
VOID CALLBACK TimerProc(
HWND hwnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
)
这样.
HWND hwnd;
void CALLBACK TimerFunc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
CString str;
str.Format("%d", dwTime);
SetWindowText(hwnd, str);
}void CDialogProjDlg::OnBnClickedButton1()
{
hwnd = m_hWnd;
::SetTimer(m_hWnd, 1, 500, (TIMERPROC)TimerFunc);
}void CDialogProjDlg::OnBnClickedButton2()
{
::KillTimer(m_hWnd, 1);
}