Jump to content
  • Advertisement
Sign in to follow this  
lordikon

Forcing 'Show window contents while dragging' OFF

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

When resizing or dragging a window, there are two settings (as far as I know). 1.) With 'Show window contents while dragging' option turned ON, the entire window will move as you move it, and resize as you resize it. 2.) With that option turned OFF, you will see an outline of the window, and be able to move or resize that outline, and when the mouse is released the window will update to that position or dimensions. For movement of my specific application I want to force 'Show window contents while dragging' ON, and for resizing I want to force this OFF. Does anyone know of a way to override windows' defaults on these settings and force it manually? For anyone who isn't sure what settings I mean, here is how you enable/disable the option: 1.) Right-click on the desktop wallpaper 2.) Click 'Properties' 3.) Click the 'Appearance' tab 4.) Click 'Effects...' 5.) Check or uncheck the box that says 'Show window contents while dragging'. 6.) Click the 'OK' button 7.) Click the 'Apply' button Now feel free to drag and/or resize some windows, then change the setting back and test it out again to see the difference.

Share this post


Link to post
Share on other sites
Advertisement
Have you looked at the MSDN entry on CreateWindowEx() and it's parameters? That's where I'd expect it to be, if it exists. I can't see why it would be an option though - surely that is a user preference, and I can't think of a reason why a program "should" ever need to force that.

Share this post


Link to post
Share on other sites
I don't absolutely NEED to force it, but the application looks so much better when it is setup that way. Of course, that is a matter of opinion, and by overriding Windows I could be pissing some people off.

I'll have to think about it I guess. It is a DX3D application, and if I update rendering while the user is dragging the window it goes fairly slow due to update the DXPresentParams every pixel the window moves. However, if the user has 'Show window contents while dragging' turned OFF then I could allow rendering to occur with no performance hit, and they could still easily resize their window.

Additionally, I already have the game rendering fine when moving the window, so if they had 'Show window contents while dragging' turned ON while moving it would actually look less polished. So basically, if I do not override the settings then only one of the two methods will ever look how I want it.

Share this post


Link to post
Share on other sites
Quote:
Original post by lordikon
I'll have to think about it I guess. It is a DX3D application, and if I update rendering while the user is dragging the window it goes fairly slow due to update the DXPresentParams every pixel the window moves. However, if the user has 'Show window contents while dragging' turned OFF then I could allow rendering to occur with no performance hit, and they could still easily resize their window.
Why do you need to do this? Are you re-creating your swap chain or resetting your device in WM_SIZING? If so, then you don't need to - just change your projection matrix to keep the scale correct, and then re-create the swap chain or reset the deivce when sizing is finished (In WM_SIZE I think).

Quote:
Original post by lordikon
Additionally, I already have the game rendering fine when moving the window, so if they had 'Show window contents while dragging' turned ON while moving it would actually look less polished. So basically, if I do not override the settings then only one of the two methods will ever look how I want it.
How does it look less polished this way?

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
How does it look less polished this way?[/quote]

While moving the window I can already keep rendering, the user can continue watching the graphics and the game loop can continue updating fine, so there would be no reason to for 'Show window contents while dragging' OFF.

However, during resizing rendering pauses, and due to that all the user can see is the window bar drawing itself over and over on the non-updating client rectangle. If 'Show window contents while dragging' is OFF during resizing I can continue rendering/updating just fine and the user will continue to see their entire window until they're done resizing.

BTW, you asked what I'm doing resize. Well, IF I was to continue rendering and scaling things properly during a resize I would have to continually change the directX settings, getting present params, initializing new ones. This alone would be expensive to do every time a pixel of window movement occured. Additionally we're using 3rd party software for our UI, the UI has to be properly scaled and positioned as well. Then the camera has to readjust the FOV for the new resolution. Also, certain textures need to be reacquired during a resize. That is the main gist of it.

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!