Jump to content
  • Advertisement
Sign in to follow this  
Jiia

Window / Overlap problem

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

Sorry to flood the forum, but I'm having multiple issues simultaneously [smile] The problem is that switching to window mode from full-screen mode (regardless of which mode I start in) causes my window to be top-most (always above other windows). This is very annoying, especially during debugging. I imagine that it enables this when I toggle full-screen. But if so, I believe it should remove it when I change back. I change absolutely zero window properties (other than size) when changing back and forth. I also get a lot of strange Direct3D messages after switching full-screen to windowed. Here are a few: Direct3D9: :WM_SIZE hWnd=19C0390 wp=0000, lp=01E1029E dwFlags=00000009 Direct3D9: :WM_SIZE: Window restored, sending WM_ACTIVATEAPP Direct3D9: :WM_SIZE hWnd=19C0390 wp=0000, lp=020002AA dwFlags=00000009 Direct3D9: :WM_SIZE: Window restored, sending WM_ACTIVATEAPP Direct3D9: :WM_ACTIVATEAPP: BEGIN Activating app pid=00000648, tid=00000a84 Direct3D9: :*** Active state changing Direct3D9: :WM_ACTIVATEAPP: DONE Activating app pid=00000648, tid=00000a84 Direct3D9: :WM_ACTIVATEAPP: BEGIN Activating app pid=00000648, tid=00000a84 Direct3D9: :*** Already activated It almost looks as if Direct3D has hooked into my message que. Why would it do this just because I switched to window mode while the device was created? It doesn't do anything of the sort if I start in window mode and stay that way. Does anyone know how to force Direct3D to leave me and my window properties alone? Hehe [smile]

Share this post


Link to post
Share on other sites
Advertisement
Are you using DXUT?
If so, then this is a known issue in the Directx (April 2005) SDK.
Here is a quote from the readme file in that SDK.

Quote:

DXUT

· When switching from full screen to windowed mode, DXUT incorrectly does not remove the "Always on Top" style of the window. This will be fixed in the next SDK release. To workaround this issue in the April SDK release, add this statement to the "Going from fullscreen -> windowed" if block at line 2863 of dxut.cpp:



SetWindowPos( DXUTGetHWNDDeviceWindowed(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOREDRAW|SWP_NOSIZE );



HTH,
Cambo_frog

Share this post


Link to post
Share on other sites
I don't use DXUT. The "Always on Top" style is never enabled in my program. Direct3D must be enabling it for me. Does this not happen for other programmers?

Thanks

edit: Thanks for the link to SetWindowPos. Calling that fixed it for me.

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!