my code : -------------------------------------------
UINT nHandle = StartTimer(5000);
UINT CMainFrame::StartTimer(int nInterval)
{
UINT nTimer = SetTimer(1, nInterval, NULL);
return nTimer;
}
void CMainFrame::OnTimer(UINT_PTR nIDEvent)
{
DoStuff();
//default handling
CFrameWnd::OnTimer(nIDEvent);
}
//------------------------------------------------
OnTimer in never called!
Am i missing something?
Thanks
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_WM_TIMER()
...
HTH Guido
"SteveS" <sser...@wagstaff.com> schrieb im Newsbeitrag
news:OAkeh4VM...@TK2MSFTNGP06.phx.gbl...
"SteveS" <sser...@wagstaff.com> wrote in message
news:OAkeh4VM...@TK2MSFTNGP06.phx.gbl...
--
Scott McPhillips [VC++ MVP]
I do have timers in other apps that work just fine, I can't seem to nail
this one down.
"SteveS" <sser...@wagstaff.com> wrote in message
news:OAkeh4VM...@TK2MSFTNGP06.phx.gbl...
Thanks for the help gang.
Steve
"SteveS" <sser...@wagstaff.com> wrote in message
news:OAkeh4VM...@TK2MSFTNGP06.phx.gbl...
You have given far too much out of context here; you corrected at least one point and said
that you know the window actually exists when SetTimer is called, and you have an
ON_WM_TIMER in your Message Map. So you need to clarify the conditions. Note that if you
want 1-second notifications while a long computation is running, doing the long
computation in the main thread is a mistake. You would want to do the long computation in
a secondary thread.
joe
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm