loopguru
10-28-2002, 08:29 AM
Hello.
Basically I have an MFC app that spawns an openGL window implemented using the windows SDK (WIN32). This opengl window has its own event handler. It is spawned when a button is clicked in the main application. The problem is I need to click somewhere outside of the entire application (i.e. activate another application or click the taskbar slot [for lack of a better term] for the opengl window - deactivate then reactivate [bring to foreground] the window) and then reactivate the opengl window in order for it to receive messages again (by again I mean it must have initially recieve windows messages in order for it be created, displayed and the openGL scene rendered). This is highly undesirable. I want the window to immediately respond to messages after it is spawned. VERY SIMPLE TEST CODE ILLUSTRATING THIS PROBLEM IS at http://xtopia0.tripod.com/testcode/openglwintest.zip (right-click and do a "save target as" to download... tripod is screwy)
Any Ideas? Is there a better way to spawn an opengl rendering window from an MFC app? (And yes I know ideally I should not use MFC at all. But I'll need it after I solve this problem.)
Thanks.
ks
Basically I have an MFC app that spawns an openGL window implemented using the windows SDK (WIN32). This opengl window has its own event handler. It is spawned when a button is clicked in the main application. The problem is I need to click somewhere outside of the entire application (i.e. activate another application or click the taskbar slot [for lack of a better term] for the opengl window - deactivate then reactivate [bring to foreground] the window) and then reactivate the opengl window in order for it to receive messages again (by again I mean it must have initially recieve windows messages in order for it be created, displayed and the openGL scene rendered). This is highly undesirable. I want the window to immediately respond to messages after it is spawned. VERY SIMPLE TEST CODE ILLUSTRATING THIS PROBLEM IS at http://xtopia0.tripod.com/testcode/openglwintest.zip (right-click and do a "save target as" to download... tripod is screwy)
Any Ideas? Is there a better way to spawn an opengl rendering window from an MFC app? (And yes I know ideally I should not use MFC at all. But I'll need it after I solve this problem.)
Thanks.
ks