View Full Version : How to disable the Minimize,Close buttons on the glui window..
10-30-2002, 08:03 PM
Can anybody please let me know how to disable the close button on the glui window Title Bar..
Actually, the problem is that once a window gets opened, on closing it..it closes the whole OpenGL window..including the parent window..which is exactly what I want to avoid..
any way out for this problem..
11-01-2002, 01:21 PM
Why don't hack the GLUT source code and change the window's attributes?
11-02-2002, 11:27 AM
Doing that would destroy the sense of portability, that GLUT provides. Accept the restrictions of GLUT or don't use it.
11-14-2002, 08:59 AM
get your hands off glut. Glut mainly use is for test-purposes. For full control, learn the WIN32 api. It's really pretty simple once you got the hang of it. Grab some good book from Petzold (Windows 95 Programming, best one is 5th edition, though older versions teach you enough to get started writing simple win9x proggies, including OpenGL of course (though OpenGL is not handled in his book, for obvious reasons))
If you want to keep on using glut, go look in the MSDN (online or from CD) for the SendMessage() function. You can use this function to send your window for example a message to kill your close-button. If i am not mistaken, there's even a win32 function, that let's you remove the system-menu from a window, which probably is the thing you want to do. But you do need the window's handle to do all that.
If you can't solve this problem, mail me your entire VC project (i presume you are using VC++ 6.0?) and i'll try to fix it for you.
(for persons who don't know how my email address can be retrieved from this forum:
My email: firstname.lastname@example.org
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.