Skip to main content
gamedev.net
🔒 Locked

MFC SetTimer crash

Started by Unfadable 0 replies 1.6k views
Original Post
Unfadable
Unfadable
Hey peoples, I have an mfc app where I'm calling SetTimer(1,1,0) in the view's OnCreate function and i call killtimer(1) in it's OnDestroy function. Periodically when I exit the app (using the x button), I crash in my OnTimer function. The member vars are garbage leading me to believe that the view class was destroyed, but maybe the timer message was processed again. Anyone got any ideas on this? I found some mfc sample code on this site that use the timer functions the same way, so I'm assuming those are good places to call set/destroy timer. Thanks,
kuphryn
kuphryn
oninitupdate and destroywindow

Now?

Kuphryn

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.