Hi all,
I'm trying to use timer in a new game. I followed GR Moore instructions but I must be doing something wrong, the timerproc would't be called.
Here's the code :
Please tell me if you see a mistake, I really do not want to base animations on frame rate for this game ;)
Thanks
I'm trying to use timer in a new game. I followed GR Moore instructions but I must be doing something wrong, the timerproc would't be called.
Here's the code :
- Code:
class MyApp : public CGapiApplicationMTwithSound
{
[...]
};
void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
HRESULT MyApp::InitInstance()
{
m_iTimerID = SetTimer ( NULL, 0, 100, ( TIMERPROC ) TimerProc );
if ( m_iTimerID == 0 ) return E_FAIL;
return S_OK;
}
HRESULT MyApp::ExitInstance()
{
KillTimer ( NULL, m_iTimerID );
return S_OK;
}
void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
// the stuff here is not executed :(
}
Please tell me if you see a mistake, I really do not want to base animations on frame rate for this game ;)
Thanks