KillTimer() has not been after destroying the CWnd.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?

Thanks in advance.

Regards,
lauch2.
 
Hallo lauch2!
I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?

Yes! Timers are directly associated with the window and are destryoed
when the window is destroyed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top