ZFGC

Resources => Coding => Topic started by: TheDarkJay on May 05, 2007, 08:44:04 pm

Title: C++ DirectX Window to match the size of the screen
Post by: TheDarkJay on May 05, 2007, 08:44:04 pm
Okay, this is something I have never actually seen in any tutorials...

When you create a Windows Window, you decide it's size. However the size you enter includes the border, so to get a 'window space' of 100*100, you'd have to do something like 106*127 (random numbers, most likely wrong). Well, then you try to run the app of another PC, and you'll still have the strangely sized screen, because on some PC's the border sizes are different.

Well, in DirectX when trying to make an app in windowed mode, this causes really annoying and ugly stretching. The only answers I can think of are to:
Run fullscreen
Tweak the window size for every possible setting, or make it editable via .ini

Well, this is obviously going to either cause problems, or make it extremely messy and complicated. Is their anyway to do it differently to this?

So, I have a DirectX window size of 200 * 150, how can I make the actual space in the Desktop Window is 200*150, not counting the border, be availiable on the various XP Border-size settings?

Sorry if this is badly worded.
Title: Re: C++ DirectX Window to match the size of the screen
Post by: Infinitus on May 05, 2007, 08:50:37 pm
Read up on AdjustWindowRectEx.
Title: Re: C++ DirectX Window to match the size of the screen
Post by: TheDarkJay on May 06, 2007, 09:22:42 am
Wooh! It works! Thanks. That's all I needed to know :)

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved