Skip to main content
GameDev.net gamedev.net
🔒 Locked

messagebox with glut

Started by DesignerX Aug 20, 2008 at 5:17 PM 3 replies 9.9k views
Original Post
DesignerX
DesignerX
How do I open a messagebox using glut ? thx.
There is nothing that can't be solved. Just people that can't solve it. :)
donny dont
donny dont
Might this be what you are looking for?

http://www.lighthouse3d.com/opengl/glut/index.php?10
DesignerX
DesignerX
not exactly. I only need to open a message box with a text in it and an ok button like in win32api.

any ideas?
There is nothing that can't be solved. Just people that can't solve it. :)
V-man
V-man
If you want a real Windows MessageBox, then there is no solution unless you want to call MessageBox and give it a NULL parameter for the HWND.

Or use CeGUI which renders things with GL.
songho
songho
It is not a good idea to put Windows specific APIs in GLUT program. But, you can call MessageBox() if you get the window handle.

// create a window with GLUTglutCreateWindow(argv[0]);// find HWND with application nameHWND winHandle = ::FindWindow(NULL, argv[0]);::MessageBox(winHandle, "message", "caption", MB_OKCANCEL);


It is a quick but dirty solution. Using cross-platform GUI library is desired as V-man mentioned.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.