On 16 Feb 2009, at 19:29, Ronnie Ward wrote:
>
> Well, think of the code structured at follows:
> int main()
> {
> //set up and show FLTK window
>
> while(true) {
>
> //user interacts with stuff in the window
> }
> }
>
> The user can exit the code using an exit button, whose callback
> contains an exit(0), or the user can close the window using the X
> in the upper right corner. The problem occurs in the latter case.
> I'd like to just catch the close (X) and exit(0), but setting a
> callback on the main window doesn't do the trick.
Hmm, OK, that ought to Just Work.
Try the ask.cxx example in the test folder - that demonstrates the
use of the window callback to catch that click and close the
window... Does it work OK for you?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk