Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


dialog window with opengl window?

This topic is 5841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can somone please give me sample code or explain how to open a dialog in a window next to the opengl window using win32 api? i tried making new window handle etc but it was getting all crazy and the nehe opengl window is really confusing to me since it like defines structures in the header file and then defines the handles there and stuff instead of just in the main c++ file even having it open the dialog box and then having a button that closes the dialog box and then opens the gl window would be of use i just cant get the dialog box to work when i am in a project with the nehe opengl window also thanks in advance

Share this post

Link to post
Share on other sites
well i was thinking of expanding on the zelda game at nehe and turning it into an rpg
i wanted a screen when you open to just be a little dialog box and have buttons for new game / save game / etc and then new game would idealy open up another little dialog box on the side next to the opengl window that would have current hitpoints etc because i was thinking it would be easiest to just display all that there, rather than trying to do all of that in the opengl window

am i mistaken and i should just do hp and stuff in game? i still would like a little opening screen first though with the buttons :\

would it be easier to learn mfc and put the opengl window within another window? (you can do that, right?)

it still would be good to know how to do what i originally asked just for knowledge''s sake, but if you could do both windows in the same window could you please tell me where to learn how?


Share this post

Link to post
Share on other sites
Okay, so you want to have a menu/HUD of sorts within a game.

I would definitely recommend learning how to make your own GUI, as it''ll be flexible, and it''ll mesh well with the rest of the game. There are an infinite number of ways to do that; it all boils down to keeping track of input and applying it to your interface to get information about gamestate, etc.

There is a way to do it with the way you suggested. Basically you''d just use CreateWindow (or there may be another method) to create a number of "controls", which the user can then interact with.

MFC is still an alternative, and it''s not too hard to learn, but it might not be worth it, and there are people who cringe at the thought of having anything MFC in a game (though it will ultimately save time and it''s not that slow). The only problem is that it''ll be much more challenging to make it "pretty,"; that is, you can''t customize the way MFC controls look, they''ll just be bland Windowz buttons, etc.

If you want a window that gives you configuration options on startup, look into Dialogs. They''re easy (especially with the Visual C++ Dialog Editor), and they require very little code to integrate.

Anyhow, that''s the way I see it. Feel free to ask questions.


//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!