I'm trying to start a timer in a CView class. I used the "Add windows message handler" class wizard to create the function:
void CTestclientView::OnTimer(UINT nIDEvent)
// TODO: Add your...
What is the correct call to start the timer? I'm trying to start the timer using:
m_n_Timer = SetTimer(1, 100, CTest1View::OnTimer);
But I get a compiler error:
cannot convert parameter 3 from 'void (unsigned int)' to 'void (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,unsigned long)'
I'm confused. the actual prototype for CWnd::SetTimer is
UINT SetTimer( UINT nIDEvent, UINT nElapse, void (CALLBACK EXPORT* lpfnTimer)(HWND, UINT, UINT, DWORD) );
But the class wizard created a function with only one parameter.
Should my OnTimer function have a prototype like above.
void (CALLBACK EXPORT* lpfnTimer)(HWND, UINT, UINT, DWORD)
All I want is a 1/10th of a second timer to do some screen updates.
Thanks for the help.