Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am making a GUI using Visual C++ 6.0 in which I have 2 dialogs and I have to draw some textures on both the dialogs using OpenGL.
One is the Main Dialog which has a submenu. On clicking the submenu other dialog opens.

I am finding two problems here:

1) The OnCreate function of OpenGL generates the handle for the window "hWnd=GetSafeHwnd()", but since I have to draw images on both the dialogs and set timers for them (e.g.,SetTimer(hWnd,1,10,NULL)), I need two different handlers.

If I use the same handler in both dialogs, it draws images only on the main dialog.

2) I need to work simultaneously on both the dialogs. But, if I minimize the second dialog, the main dialog is also minimized and if i close it the other one also closes.
I should be able to work independently on both. How is this possible?

Please help!!

Regards,

Timkee
Posted

You need to study about the activX programming.
Check the following link for beginner
http://www.codersource.net/mfc/activex-com-dcom/creating-custom-activex-controls-in-visual-c.aspx[^]

Opengl with activeX
http://www.codeproject.com/KB/openGL/opengl_activex[^]
 
Share this answer
 
HI
Create ActiveOCX of Opengl functionlity .
Insert Opengl ActivOCX in Both dialog and they are working independently.


Thanks
Gajera
 
Share this answer
 
Thanks.

But I am not much familiar with the ActiveX programming. Could you please elaborate how to go about it if you have tried it earlier?
I have searched about it on net, but I am still not very clear how to proceed with its implementation.

Whether any additional library or header files required to be included in the program?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900