CodePudding user response:
Start the timer in the OnInitialUpdate, destruction of the timer in the DestroyWindowCodePudding user response:
And then used in the destructor KillTimer () function to close the timer, this place didn't releaseCodePudding user response:
KillTimer put it in the OnClose message processing function, because the timer related to create and the window object, the first parameter is the settimer, destructor, window object has been destroyed, the first step to close the window is to close the window first, and then destruction of other resources, so try to destroy the timer before destruction of window