Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Window width/height

Author
Message
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 17th Jun 2007 19:51
Not really a newcomer but didn't know where to post this. Anyway, how can you get window width and height?
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 17th Jun 2007 19:52
You mean return the window width and height? Or change it?

Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 17th Jun 2007 19:58
Yeah, i'm updating my level editor and want to make a render window and I need to return the window width and height, how?
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 17th Jun 2007 21:04
screen width()
screen height()


Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 17th Jun 2007 21:54
Quote: "screen size is not the same as window size. You need to call GetActiveWindow and GetWindowRect from user32.dll to get the window size."

Oh, sorry, I misunderstood, I thought that's what he wanted.


Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 18th Jun 2007 10:14
Sorry I couldn't reply yesterday, net connection was down. Anyway cheer's Gil Galvanti and WindowsKiller that thread really helped.

Another thing, why isn't there a window width/height command?
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 18th Jun 2007 16:36
Does anyone know how to stop sprites or 2d stuff from stretching or resizing when the window size is changed? Thanks in advance.
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 18th Jun 2007 18:26
This is not good for an level editor to keep reloading all the media every time the window changes size. Is there know other way?
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 18th Jun 2007 18:37
I guess i'll have to disable it, though it would have been nice. Cheer anyway WindowsKiller.

Login to post a reply

Server time is: 2024-09-27 01:16:26
Your offset time is: 2024-09-27 01:16:26