PDA

View Full Version : window closer detection using GLUT on MS_WINs



Somay
05-22-2002, 04:53 AM
Does GLUT know when the application window is shut by using (by clicking the 'x' button)?

when I try to relink the program, my linker doesn't let me because the .exe file is still is use my the OS (in memory - press alt-ctl-del and see the list) and I have to end it manually (remove it from mem.) but I don't want the user to have to do that, I would like to call exit(0) to end the program normally when the user try to shut the window.

I tried different tricks to find out, for eg. creating a child window that have the application in hope that the focus will go to the parent window when the child is shut, but apparently the GLUT doesn't know that the window is shut and keeps on returning it's ID when calling glutgetwindow().

Anybody can help?
Thanks

Rob Fletcher
05-22-2002, 05:11 AM
GLUT does know, but executes "exit(0);" nad
will shut down the app, no matter which window was closed too!

Check an earlier thread from me which talks
about this.

See fix on
http://www-users.york.ac.uk/~rpf1/glut.html

Rob.