Jump to content
  • Advertisement
Sign in to follow this  

Direct3D9 - Fullscreen to Windowed transition and Aero

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

OK, I'm having trouble managing the transition from fullscreen to windowed modes using D3D9, and the impact of this on Aero/DWM themeing of the window's non-client area.


Switching from windowed to fullscreen is OK.  Switching between windowed modes is OK.  Switching from windowed to fullscreen is OK.  The specific problem is with switching from fullscreen to windowed modes, and it's consistent whether I start fullscreen then switch to windowed, or start windowed, switch to fullscreen, then back.


As part of the switch back to windowed, D3D9 disables Aero on the non-client region of the window.  It doesn't disable Aero entirely, it on does so on the window itself.


Tracking the messages, I can see that I get a WM_DWMNCRENDERINGCHANGED with WPARAM 0 during a transition to fullscreen - so it's evident that D3D9 disables Aero at this point.  I don't get one when transitioning back.


Using DwmSetWindowAttribute with DWMWA_NCRENDERING_POLICY and DWMNCRP_ENABLED as part of the mode change (just after the D3D device has completed recovery) I get a succeeded HRESULT but no intended effect (nor does a WM_DWMNCRENDERINGCHANGED message arrive).


Querying with DwmGetWindowAttribute and DWMWA_NCRENDERING_ENABLED confirms that non-client rendering remains disabled.


I know that I can bypass all of this by just using D3DCREATE_NOWINDOWCHANGES but then I get to have to mess around with controlling the mouse, managing focus and other nonsense, which is a hell of a lot more work.  It seems obvious that there should be a way to get proper non-client rendering back, but what on earth could that way be?

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!