Jump to content
  • Advertisement

Archived

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

aleks_1661

OpenGL Hidden Popups when using OpenGL and MFC

This topic is 5329 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, I derived a CWnd class that gives me an OpenGL Surface within an MFC appplication. However, when i attempt to show a popup window over the application, the popup is (i am assuming) obsured by the Opengl part of the window, until i press alt, at which point the window comes to the front. When such popups are visible (even in modal state) the opengl window continues to draw. Any Ideas on how i can sort any of these two problems? "Very funny, Scotty. Now beam down my clothes."

Share this post


Link to post
Share on other sites
Advertisement
why alt? Find out why pressing alt makes a difference and do it artificially when you open the pop up. It'll be something to do with the popup's draw method not being called until the alt activates it in some way. Some research into the execution flow of MFC and it's events should help.

Sounds like your MFC framework does something which takes a lot of people ages to do - it overrides the MFC draw timings. Be happy. Otherwise it would only update when it got a message from windows to do so.

This is why I much prefer open GUI libs ( FLTK especially) - you can see from the source and docs exactly where execution goes instead of relying on the badly written MSDN. Sorry, pet rant.

edit: whoops, didn't end the link tag.


[edited by - mrbastard on January 12, 2004 12:04:47 PM]

Share this post


Link to post
Share on other sites
The alt key causes the active button to be highlighted. Its really annoying me, though it is nice that the 3d scene keeps animating even with modal dialogs running!!

Share this post


Link to post
Share on other sites
mrbastard, i hate mfc too, but i must point out the source code of mfc is provided.

Share this post


Link to post
Share on other sites
I found out what was causing the prob.

In the OnPaint Method for my OpenGL control, i wasn''t calling the base method CStatic or CWnd::OnPaint() Doing this solves the popup problem, but stops the animation.

If only i could get the best of both world, it doesnt seem a lot to ask.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!