Sign in to follow this  

Win 32 API with OpenGL

This topic is 4727 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

I wanted to create a window which would popup when the program start. It would allow the user to select the window height, width, fullscreen, screen resolution .. etc. Then create the Gl Window based to that info. Is that possible?

Share this post


Link to post
Share on other sites
My Creative Contest demo entry source" has got exectly what you're talking about.

Have a look at the following files: Dlg.h, Dlg.cpp, OptionsDlg.h, OptionsDlg.cpp, and main.cpp. Basically, you create a dialog template in visual c++ (which I'm assuming you're using), give its ID to my Dlg class (My OptionDlg class hard codes that ID (its a child class of Dlg)) and call DoModal(). The dialog will stay open until the user closes the dialog whereafter I get the settings. The code is all straight Win32, and can thus be a bit much, but you can use MFC (which an add a lot of bloat to your code) instead as it handles the win32 wrapping for you. Personally I like the "down and dirty" win32 code [smile]

While you're more than welcome to make use my code, I strongly suggest that you just use it as a reference and look up the Win32 function calls necessary to create a dialog, as well as the commands needed to get the states of tick boxes, radio buttons, edit boxes etc. I'm also not on the net too often so can't help you much with working out my code [depressed]

Hope that helps and good luck.

Share this post


Link to post
Share on other sites

This topic is 4727 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this