PDA

View Full Version : Can I display opengl map on window's control?



09-21-2001, 03:18 AM
I want migrate our openGL application from
unix to windowNT via visual C++.
Can I display the openGL map on a control in
the dialog box (not console / window)?
Thank you.

Korval
09-21-2001, 10:27 AM
Well, a dialog box is a window; it has an HWND, so it is a window. And, as long as it has an HWND, you can get an HDC, select a pixel format, and bind OpenGL to it. So, yes, you can draw into a dialog box's window. You can even draw into the window of a control. I'm not certain how controls that sit on top of an OpenGL window will react to OpenGL being drawn under them, however.