How to disable the Minimize,Close buttons on the glui window..

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…


Why don’t hack the GLUT source code and change the window’s attributes?

Doing that would destroy the sense of portability, that GLUT provides. Accept the restrictions of GLUT or don’t use it.

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: