代码:
void CALLBACK SelMon_Timer(
HWND hwnd,
UINT uMsg,
UINT idEvent,
DWORD dwTime )
{
if (ipDeath !=NULL)
{
if (*ipDeath == 0)
{
BeatMon();
return ;
}
}
SelMon();
}void CALLBACK BeatMon_Timer(
HWND hwnd,
UINT uMsg,
UINT idEvent,
DWORD dwTime )
{
BeatMon();
}
void CWGFram::OnStart()
{
UpdateData( true);
int iTimer =m_iTime*1000;
int ibeatMon = iTimer-500;
iHP =m_iHp;
::SetTimer(NULL,Timer1,iTimer,SelMon_Timer);
::SetTimer(NULL,Timer2,ibeatMon,BeatMon_Timer);
}
void CWGFram::OnStop()
{
::KillTimer(NULL,Timer1);
::KillTimer(NULL,Timer2);
}第二个定时器 kill不了 回调函数 还在定时调用啊晕 请高手帮忙分析下 这代码哪里错误了。。
void CALLBACK SelMon_Timer(
HWND hwnd,
UINT uMsg,
UINT idEvent,
DWORD dwTime )
{
if (ipDeath !=NULL)
{
if (*ipDeath == 0)
{
BeatMon();
return ;
}
}
SelMon();
}void CALLBACK BeatMon_Timer(
HWND hwnd,
UINT uMsg,
UINT idEvent,
DWORD dwTime )
{
BeatMon();
}
void CWGFram::OnStart()
{
UpdateData( true);
int iTimer =m_iTime*1000;
int ibeatMon = iTimer-500;
iHP =m_iHp;
::SetTimer(NULL,Timer1,iTimer,SelMon_Timer);
::SetTimer(NULL,Timer2,ibeatMon,BeatMon_Timer);
}
void CWGFram::OnStop()
{
::KillTimer(NULL,Timer1);
::KillTimer(NULL,Timer2);
}第二个定时器 kill不了 回调函数 还在定时调用啊晕 请高手帮忙分析下 这代码哪里错误了。。
解决方案 »
- 老问题,至今没解决
- 使用CTypedPtrArray参数不能转换的问题
- 怎样可以在CListCtrl只有16宽度的列中,正确显示了两位数字如"99"
- 请问我如何获取用CreateProcess启动的进程的HINSTANCE?
- 在win98se,VC6.0环境中,调用LoadLibrary函数失败,请大侠帮帮我。
- 急,请高手指教,怎样将"list Control"控件里面的数据打印出来?
- 有人看过MSDN里的ATL属性化例子吗?里面的__hook,和__unhook可以用来hook api吗?
- 怎样快速的学好利用MFC开发一个系统
- 这个程序哪里错了
- 请问高手,如何把资源里包含的文本文件写到硬盘上。
- 键盘消息:按键消息与字符消息的区别
- 求在无alt,ctrl键的情况下为菜单添加快捷键的方式?
HWND hWnd, // handle to window
UINT_PTR nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // timer procedure
);hWnd
[in] Handle to the window to be associated with the timer. This window must be owned by the calling thread. If this parameter is NULL, no window is associated with the timer and the nIDEvent parameter is ignored
这时KillTimer你应该用SetTimer返回的id