Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: video_window() [Re: ventilator] #272207
06/16/09 22:04
06/16/09 22:04
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
once you have the event, you can read out the
current screensize (already works), and update the positions of
your panels (and whatever else needs to be adapted)

Re: video_window() [Re: Damocles_] #272218
06/16/09 22:36
06/16/09 22:36
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
no, screen_size is the engine resolution. it doesn't change if you resize the window but the rendered image gets distorted. this isn't wanted in most cases.

so in the event i would like to get the space that is available for the directx surface like that:

Code:
void resize_event(sizex, sizey) // the same for maximize event
{
    // adapt engine resolution to the available space
    video_set(sizex, sizey, 0, 0);
}


Re: video_window() [Re: ventilator] #272247
06/17/09 05:42
06/17/09 05:42
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
What do you mean by "space that is available for the directx surface"?

You can just call video_set and use the desktop resolution through sys_metrics, minus the border. There is no special space for DirectX surfaces. All modern 3D cards can use the full desktop for the frame buffer. How fast this will render is another question.

Re: video_window() [Re: jcl] #272330
06/17/09 14:20
06/17/09 14:20
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i mean the space which is available in the window for the a7 engine. "directx surface" was the wrong term for that.

Quote:
and use the desktop resolution through sys_metrics, minus the border.
can i get the window size too? i would like to have the window working properly in all cases (resizing to arbitrary sizes by dragging the border and maximizing).

i saw some threads where people claimed that the border size you can get with sys_metrics isn't reliable with some windows versions?

but if this works flawlessly with the sys_metric values then it's fine.



another important function which came to my mind is trapping the mouse to the engine window. there are some user contributions which use the win32 api for that. i haven't tried them but according to some responses they also don't seem to be reliable in all cases. so it would be great if the engine provided a built-in function for that.

Re: video_window() [Re: ventilator] #275715
07/02/09 08:44
07/02/09 08:44
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
http://www.conitec.net/beta/on_maximize.htm

thanks for adding this!

could you also add an option for WS_MAXIMIZE so that an application can start maximized?
http://msdn.microsoft.com/en-us/library/ms632600%28VS.85%29.aspx

Page 2 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1