Jump to content
  • Advertisement
Sign in to follow this  
xlad

DirectX Window Resizing (with no borders)

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

Because i use hooks for keyboard and mouse input (i really need this kind of input, the usual way through window messages doesn't send some messages i need) , the minimize, maximize and close buttons when are clicked by the user, Windows hangs everything for a few seconds (on both my computer, on a virtual machine and on a friend's computer).

So i decided to make the window without borders, and handle my self the border move, resize, minimize, maximize and close buttons.
Here's an example using GDI :
http://www.filefront.com/17513136/ExampleGDI.exe

I've read some book about DirectX and made some examples, but i'm not that good at graphic programming. Yet xD.

I am wondering if it's possible to make something like this, but using DirectX.

If i setup a backbuffer equal to the current resolution of the screen, and only draw on a part of it which is equal in size with the current window resolution and use viewports to render it to the window, will it work? Only when the resolution is changed, i change the backbuffer size.

The contents of the window are drawn when PeekMessage returns no message, or when WM_PAINT is received. (This way, frames are drawn also when the window is moved and resized)

Will this work? Or anybody has some experience with this?

Share this post


Link to post
Share on other sites
Advertisement
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!