detecting graphics window close

BlitzMax Forums/BlitzMax Programming/detecting graphics window close

Chris C(Posted 2006) [#1]
I have a max gui app that now and again calls a function that briefly calls graphics does some graphics and then closes the window with endgraphics before returning to the gui

all works well, unless you close the graphics window with the close button on the top right of the toolbar, execution continues in the function and for the life of me I cant see a way of detecting the window closure...

anyone any bright ideas?


Dreamora(Posted 2006) [#2]
[edited] You have to detect the EVENT_WINDOWCLOSE event if you want to take care of clicking on the X

*thx to the next posting - somehow twisted head*


Yan(Posted 2006) [#3]
...EVENT_WINDOWCLOSE...


Chris C(Posted 2006) [#4]
not on a window opened with graphics command...

anyhow I ended up putting it all on a gui canvas now which is what I should have done in the first place...


fredborg(Posted 2006) [#5]
While AppTerminate() = False And KeyHit(KEY_ESCAPE) = False
  ' Do your thing
Wend