Adding another Form to opengl app

Started by
3 comments, last by nemesisgeek 17 years ago
I have written an opengl app based on NeHe sample code. Now I needed to add another form to the application to control some of the features. I have written the app in VS .NET 2005 When I tried to add a windows form I got large number of errors. Anybody has any suggestions how to proceed.
Advertisement
Do you intend to render opengl in the second window? Or put in buttons and such?

I can't tell you what the problem is based on what you've said, but one suggestion I could make is that you run opengl inside a panel control in your main form. Then you can add buttons and such to that form as well.

Anyways, telling us what the error(s) are would be helpfull.
Second window has buttons, menus etc. only
Only the first window is rendered with opengl.

I used NeHe sample code as the basis, now I need to add second form to control the first window opengl graphics.
To quote myself:

Quote:Original post by gharen2
telling us what the error(s) are would be helpfull.


Plus, I'm not sure nehe's code is the best choice for an application with multiple windows. It's designed to be very minimalistic. ie, create a single game window, display it, and do the minimum event handling. You might be better off writing your own windowing system using nehe's code as a guide.

It would be helpfull to know what language you're using too. Something like this would be a million times easier to do with the .net framework than c++, for example.
On Windows, OpenGL windows have the WS_CLIPCHILDREN style. In other words, if you have an OpenGL view window within your main frame window, you can't make your window a child of the view - it has to be a child of the main frame.
hackerkey://v4sw7+8CHS$hw6+8ln6pr8O$ck4ma4+9u5Lw7VX$m0l5Ri8ONotepad++/e3+8t3b8AORTen7+9a17s0r4g8OP

This topic is closed to new replies.

Advertisement