I have a "clean up dirty file" routine I use when the user chooses "Quit" from the menu. I want to plug that same routine into action when the user clicks on the "X" in the corner of the window to quit, instead of using the menu.
case @IDCLOSEWINDOW
IF dirtyfile = 1 then GOSUB doDirtyFile
run = 0
Doesn't work. I'm guessing that's because the window is already closed by the time the @IDCLOSEWINDOW message hits the loop. Any suggestions to fix, or workaround?
See what @IDDESTROY does.
Larry
Thanks, Larry. I can put this puppy to bed, now!
Should work fine, of course. The X in the title bar sends the @IDCLOSEWINDOW message, so the window is never closed unless you are actually calling the CloseWindow command.