getting problem in ontimer(UINT nIDEvent)
-
hi i want call OnTimer(UINT nIDEvent) in same class by using SetTimer(4444,5000,NULL); but i am unable to call ,it didn't go in OnTimer() body can anyone help me. thanks in advance sachin
cancerion wrote:
but i am unable to call
There is no need to call OnTimer. It's called everytime a WM_TIMER event is fired. Did you add a message map entry for OnTimer. That is ON_WM_TIMER()
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
cancerion wrote:
but i am unable to call
There is no need to call OnTimer. It's called everytime a WM_TIMER event is fired. Did you add a message map entry for OnTimer. That is ON_WM_TIMER()
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
hi , i have tried this there is no change in situation , while i have one application uaing this function , i have followed that ,still i m unable to do that
How is OnTimer declared
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
How is OnTimer declared
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
This how I do... BEGIN_MESSAGE_MAP(.......) ON_WM_TIMER() END_MESSAGE_MAP() afx_msg void OnTimer(UINT nIDEvent); SetTimer(timerID, delay, callback); //rest of the code void MyClassName::OnTimer(UINT nIDEvent) { ..... } well it will work if it done like this... Change the delay to 1000... So that you can check faster Try again
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
This how I do... BEGIN_MESSAGE_MAP(.......) ON_WM_TIMER() END_MESSAGE_MAP() afx_msg void OnTimer(UINT nIDEvent); SetTimer(timerID, delay, callback); //rest of the code void MyClassName::OnTimer(UINT nIDEvent) { ..... } well it will work if it done like this... Change the delay to 1000... So that you can check faster Try again
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
thanks, i think ,i have made a mistake in my main program . in which it's not working .i also made a program separately and it was working .so now i will make changes again in my main program thanks once again
cancerion wrote:
.i also made a program separately and it was working .so now i will make changes again in my main program
Is your timer program have his own window!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV