PDA

View Full Version : OpenGL and MFC



yaro_dup1
06-21-2003, 02:40 AM
Hi,

I wanna write a program using 4 GL windows using MFC. What kind of MFC control should I use in order to paste it in dialog based app?

I wonder that maybe it'll be faster to write it in C++ Builder? There is a lot of controls and it's easy to make with it GL window.

Thanks in advance

kehziah
06-21-2003, 04:24 AM
CStatic is a good candidate.

You retrieve its HWND at startup (probably in InitDialog (not in the constructor of your dialog, since at this time the windows are not created yet, hence all the HWNDs are NULL)), and you create a GL rendering context as usual.

You can run into problems if you target NT4 platforms (well at least integrated Intel controlers under NT4). On such a system, I had to manually create a window, the driver did not handle GL in a control correctly. It worked fine on "good" systems though (acceptable OS + drivers).