View Full Version : OpenGL used in a subsection of an MFC CDialog
PeterK
02-08-2000, 08:45 AM
I am trying to create a dialog using Visual C++ that has a small OpenGL "window" embedded inside it.
I have succeeded in enabling OpenGL to draw to the entire window but I want to confine it to a small subsection (so that MFC controls most of the dialog's background).
Is there a simple way of doing this?
Is ActiveX the answer?
OK, that can be tricky....
You should create a new class and use it as a custom control in your dialog box....
Concerning this new class you would create, you then have to put all your OpenGL inits in this class instead of in the CDialog-derived class of your application...
I know that can sound a bit messy but I assumed there that you are familiar with MFC and class-derivation...
Of course, you can also create an ActiveX control for this purpose but this is REALLY tricky (I have just finished one for my viewer...).
Eric
DJSnow
02-08-2000, 11:58 PM
Make any control-element with an own DC.
You are able to render to all "elements" with an own DC in it. Modify the size of the DC, to the size you want.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.