Stan wrote:
> Sorry, I wasn't clear enough. The window doesn't exit
> in response to the escape key or its 'x' button.
Sounds like you want the window's callback.
In that case use win.callback() instead of btn->callback();
only the window's callback traps the 'x' and ESC.
And even then, you'll need to call hide() or exit()
from the callback to make the app exit.
I prefer exit()/_exit() myself, since with hide()
you have to make sure you hide /all/ open windows,
not just the main window. (eg. file browsers, error dialogs..)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk