如何在类中定义回调函数?
timeSetEvent(1000, 1, this->TimerProc, 0, TIME_CALLBACK_FUNCTION);
第三个参数是一个回调函数,我这样用会报错
error C3867: 'CMani::TimerProc': function call missing argument list; use '&CMani::TimerProc' to create a pointer to member
下面是回调函数的声明和定义:
**.h
LRESULT WINAPI DoTimerProc(UINT, UINT, DWORD, DWORD, DWORD);
**.cpp
LRESULT WINAPI CMani::TimerProc(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2){...}
应该怎么用才不会报错啊,不要告诉把TimerProc定义成static的,里面会处理其他的类成员.
谢谢