Archived

This topic is now archived and is closed to further replies.

Old_Rod

MFC and OpenGL?

Recommended Posts

Looking for a good example of creating a tabbed dialog in one pane of a splitter window, with an OpenGL canvas in the other pane. Anyone know of a good example/tutorial for this?

Share this post


Link to post
Share on other sites
quote:
Original post by Old_Rod
Looking for a good example of creating a tabbed dialog in one pane of a splitter window, with an OpenGL canvas in the other pane. Anyone know of a good example/tutorial for this?



It''s actually not that hard. Both panes of the splitter each have their own DC right? Just pass the DC you receive to wglCreateContext and you''re golden.

Share this post


Link to post
Share on other sites
The more "MFC way" to do it would be to derive a class from CWnd that uses an OpenGL context. Then you can use said class as a control much like any other common control. You can then create OpenGL controls willy nilly all over the screen ''til your heart''s content, without having to worry about the position constrictions on the SplitterWnd.

Share this post


Link to post
Share on other sites