Working with OpenGL on multiple dialogs in VC++

Started by gargimails, October 21, 2010, 05:27:36 PM

Previous topic - Next topic

gargimails

Hello,

I am making a GUI in visual C++ which is using openGL to draw images and textures on dialogs. The application has two dialog windows, parent and a child, on which different images are to be drawn using openGL. The openGL functions are written in one source file, which is common to both the dialogs.
Now, the problem I am facing is that, even though I am able to draw openGL images on the dialogs, I can only work on one dialog at a time.
I am unable to switch between the dialogs. If I draw on child dialog, the main dialog doesn't work and program gets hanged,and its vice-versa.

Somebody has suggested to create ActiveOCX functionality for openGL and then insert this ActiveOCX code in both the visualC dialogs, so that openGL functionality will work independently in both the dialogs.
I am still not clear about the implementation and purpose of ActiveOCX even though I have searched it on internet.
Can anyone please suggest how to implement this OCX functionality of openGL in VC++ dialogs? Or if there is some other way out.

A piece of code would really help!!

-Timkee