Samer
Samer

Reputation: 1980

Do you have to kill timers in mfc?

Do you have to make sure to kill all active Timers before closing/destroying an MFC dialog?

Upvotes: 1

Views: 583

Answers (1)

Marius Bancila
Marius Bancila

Reputation: 16338

A timer is associated with a window. It is destroyed when the windows is destroyed. You don't have to do that explicitly.

However, if you want to do it, then you should kill the timer when the window is destroyed. The best place is do to that when handling the WM_DESTROY message.

Upvotes: 3

Related Questions