How do you cancel an EVENT_APPTERMINATE

BlitzMax Forums/BlitzMax Programming/How do you cancel an EVENT_APPTERMINATE

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm trying to check the EVENT_APPTERMINATE in my main game loop and then if its true, I want to change my gamestate to an exit value. Then on the next pass, I can clean up and exit smoothly and offer the user a messagebox to cancel the EVENT_APPTERMINATE. So my question is how do you cancel the event, so it doesn't go and destroy my window?

If this isn't clear enough, what I'm trying to do is give the user the opportunity to decide if they really want to quit the game. In VB6, you could trap for the event and then just set Cancel=True and it would act as if nothing had ever happened.

Anyone have any ideas?