Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (VoroneTZ), 1,276 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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: 27,987
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,987
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 | chip programmers | 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