Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
manipulating the engine window #139810
07/06/07 07:21
07/06/07 07:21
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
a6 always has been a bit limited when it comes to windowed mode.

for example i often would have liked minimize and maximize buttons and that the video resolution automatically adapts if the window gets resized.

is it possible to add such things to the engine window with lite-c in pure mode?

would it also be possible to add a menu bar?

Re: manipulating the engine window [Re: ventilator] #139811
07/06/07 07:28
07/06/07 07:28
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Sure, why not? Just do it.

Re: manipulating the engine window [Re: jcl] #139812
07/06/07 07:56
07/06/07 07:56
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
can you give some hints or a link to a website where the needed win32 stuff is explained a bit?

Re: manipulating the engine window [Re: ventilator] #139813
07/06/07 08:38
07/06/07 08:38
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Good question. I do not know such a website at the moment, but maybe I'll find one. Generally, the best source for the Win32 API is the help file of VC++, but there are also many books about Win32. For adding a menu you can just look over the legacy mode examples, like mandelbrot.c

Re: manipulating the engine window [Re: jcl] #139814
07/09/07 13:02
07/09/07 13:02
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i looked around a bit and found some examples of how to create a window with minimize and maximize buttons and how window events get processed.

but with lite-c in pure mode the window is already there. i didn't find anything yet about modifying existing window.

Re: manipulating the engine window [Re: ventilator] #139815
07/29/07 20:47
07/29/07 20:47
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline
Member
Nicholas  Offline
Member

Joined: Aug 2002
Posts: 164
Houston
I have a widescreen monitor and don't like what it does when fullscreen, so I am using this to keep a good ratio no matter what the screen size:
Code:
var desktop_size[2];
function main
{
desktop_size.x = sys_metrics(0); // SM_CXSCREEN
desktop_size.y = sys_metrics(1);
// place the window at position (500,300) and remove the border
video_window(vector(500,300,0),nullvector,112,"Render");
// But a small engine window at this position (to fake the eninge into another applictaion)
video_set(desktop_size.x-6, desktop_size.y-63, 32, 0);
level_load("level.wmb");
}



that 500,300 doesn't matter. I have it setup to have a regular window with a minimize and close button. I trim down the x by 6 for window borders and the y by 63 for the taskbar.
I really would like to make it sizeable, have a working maximize button, and have the standard file, edit, help style menu. If nothing else, that part can be faked, but I would also want a standard windows "file open" dialog box.

I'll take a look if the other suggestions would work, but I wanted to let you know one possibilty on the window.


Black holes are where God divided by zero.
Re: manipulating the engine window [Re: ventilator] #139816
09/12/07 20:02
09/12/07 20:02
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline
Member
yorisimo  Offline
Member
Y

Joined: Mar 2007
Posts: 197
Did you figure out more about this? (how to modify the engine window in Lite-C pure mode) All I really want is a maximize button, but it may be useful in the future for me to also add menu buttons.

Also, when stretching the window, I'd like to adjust the resolution to match the size of the window, so that aspect ratios stay the same and everything looks nice. In order to do this, I need to know what size the engine window actually is. (screen_size is the resolution but not the actual size of the window ,ie, if you stretch the engine window, screen_size will not change.) Any ideas on this?

Last edited by yorisimo; 09/12/07 21:32.
Re: manipulating the engine window [Re: yorisimo] #139817
09/12/07 23:03
09/12/07 23:03
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi !

Look at sys_metrics in the manual.
It may be what your looking for.
I've seen it but have not used it up to now.

Ottawa

Re: manipulating the engine window [Re: Ottawa] #139818
09/13/07 13:17
09/13/07 13:17
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline
Member
yorisimo  Offline
Member
Y

Joined: Mar 2007
Posts: 197
sys_metrics is for system properties like how big the desktop is, what size default icons and borders are, but it won't give the current window size.

The engine window (when using video_window type 48 or 112) has a maximize button and a menu option maximize but they are grayed out. My main question is how I access these window properties in Lite-C pure-mode to add maximize functionality, and then also stretch functionality

Re: manipulating the engine window [Re: ventilator] #139819
09/13/07 14:14
09/13/07 14:14
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline
Member
TheThinker  Offline
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
I have added a Menu Bar to the engine Window. But the problem is, that I cant setup events for the menu items. Is there a way to overwrite the Wndproc function of the enginewindow. If you create an own messageloop it blocks the window and no frames a rendered. In C++ I am able to create all this nice win32 API stuff, but I don't understand how to set it up into the native enginewindow.
If I render the eingine into another window, only the first frame is visible.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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