Jump to content
  • Advertisement
Sign in to follow this  
mikesc

Switch to windowed mode, window stays always on top

This topic is 4439 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, I´m having a problem with my game window. When I switch from fullscreen to windowed mode while the game is running, the window always stays on top, although it can be minimized. The title bar turns grey and the window loses focus when I activate another window but it doesn´t hide. When I start the game in windowed mode everything works fine. When I switch from fullscreen to windowed mode I just change the "presentParameters.Windowed" to true, set the "presentParameters.BackBufferFormat" to default, so it uses the desktop-bpp. Then I reset the device and reaquire unmanaged resources. Then I update and show the window. Thats all I do. I´ve tried changing window styles, "ShowWindow()" parameters, but it always stays on top. When the window is inactive I only run the message loop. How can I prevent the window to be topmost?

Share this post


Link to post
Share on other sites
Advertisement
Ah, I have had this problem before. Make sure you don't have HWND_TOPMOST anywhere. If you want the app to appear on top just once, use HWND_TOP once.

Share this post


Link to post
Share on other sites
Thanks a lot.
A call of SetWindowPos() with "HWND_NOTOPMOST" fixed the problem. (Although I never make the window topmost at all)

Mike

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!