Jump to content
  • Advertisement
Sign in to follow this  
uniquestudios

DirectDraw: MessageBox losing focus

This topic is 4872 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

I'm working on a small sprite based level editor and i am using the WINAPI MessageBox() function to display messages, such as checking whether you are sure that you want to quit the application, etc. The only problem is the message boxes are sometimes appearing behind the primary surface and only become visible birefly when you alt-tab out to the desktop. I've tried using various flags to get around the problem such as MB_TOPMOST, MB_SETFOREGROUND as well as MB_APPLMODAL and MB_SYSTEMMODAL, but none of which seem to have solved the problem. Any help would be greatly appreciated, Dave. Edit: Also it may be worth noting that the MessageBox is triggered by a mouse click using the WM_LBUTTONDOWN message, setting a variable bool mouseClicked to true and then dealing with the mouse click in the main game loop. However, i don't think this should be affecting the MessageBoxes focus.

Share this post


Link to post
Share on other sites
Advertisement
If running in fullscreen mode, you need to do a FlipToGDISurface, which makes the surface that the GDI writes to the primary surface.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!