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

Message Box

Started by wolfman8k Oct 17, 2000 at 6:20 AM 10 replies 800+ views
Original Post
wolfman8k
wolfman8k
How would I pop up a message box when you run the game that asks which resolution and color depth the user wants? thanks
oglman
oglman
Why don''t you just have a texture that is your message box and apply it to a quad that is in front of your scene and then have the buttons operated by the mouse handler??

That probably won''t work but it''s worth a try..
Gindew
Gindew
If you''re wanting to do this using the Windows SDK, then you''ll have to create a dialog resource and an event handler for it. Look for modal dialog boxes in MSDN.

If you want to do something that''s part of your game''s user interface, then some of your game''s implementation details are needed. Are you using OpenGL? DirectX? Your own API?
"No army has ever marched into battle thinking the Creator had sided with their enemy." - Terry Goodkind
wolfman8k
wolfman8k
I want something like Nehe''s "Do you want to run in fullscreen?" message box, but with a few more options to choose also the resolution and color depth. I don''t know any windows programming(other than OpenGL, but even that, I only understand the things I "need" to know like drawing, and not window handling). I''ll have a look at MSDN. Do I have to use a dialog resource and an event handler? Or is there just a few functions I can call that will return the result, like Nehe''s?

Thanks
wolfman8k
wolfman8k
I made a dialog box, but I''m having trouble making the class. Does anyone know of any good tutorials on modal dialog boxes in Visual C++?

Thanks
Strylinys
Strylinys
Hmmm... This question seems reminiscent of SKSlayer''s question a while back... He created a popup dialog box with drop down select and everything for his demo... Well, I forget where to get it, but hey... If he were here, I''m sure you''d get a good answer.

S.
wolfman8k
wolfman8k
Strylinys: do you mean this?

http://www.gamedev.net/community/forums/topic.asp?whichpage=1&pagesize=24&forum_title=NeHe+Productions&topic_title=Dialog+box&forum_id=27&topic_id=26062

He wanted to know how to render OpenGL in a dialog box(I think), not how to open a simple a dialog box and return the values to the program.

What I need is really easy. Doesn''t anyone know?

Thanks
avianRR
avianRR
I just posted code to my site that shows how to create a simple do nothing dialog box with a checkbox in it. http://tannara.2y.net/ please be patient with the server, it''s been spazing out the last couple days!
Go to the section on windows programing then go to dialog doxes. the code''s there
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
Ozz
Ozz
I have the code you need, e-mail me at ''hennessye@mcom.cit.ie'' and I`ll send it to you. A simple openGL app that asks the user (via dialog box) at initialistation what resolution is wanted, fullscreen/windowed etc.. It also has a menu-bar to change resolution on the fly.

Ozz.
Strylinys
Strylinys
Hmmm... Apparently I said some message that translated wrong when I typed it in... What that was SUPPOSED to say was...

I had seen a demo by Eduard Manchado Safont and Christiian Janssen Miralles... It''s called Sun Adventure... It had a setup thing you could open and it had drop down boxes and bullet selections and things... I don''t know if you can find the .zip as a link on NeHe''s site (that''s one of the problems with it, you can''t find links if you miss it in the news... After it''s old news, I guess you just can''t get it... Anywho, the link is here...

I am the link to the source code zip... Click me!

By the way, it''s completely uncommented. Have fun!

S.
wolfman8k
wolfman8k
avianRR: I can''t seem to find the section on windows programming

I only see these sections:

About Programming
C/C++
VB
OpenGL
OpenAL
DirectX
Direct3D
SQL
zedzeek
zedzeek
im willing to chuck up source on me site on how to do this sorry only win32 API, a bit like empires or worldbuilder on me site.

http://members.xoom.com/myBollux

Topic Locked

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

Sign in to reply to this topic.