Sign in to follow this  
xlad

DirectX Window Resizing (with no borders)

Recommended Posts

xlad    101
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this