3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
auto maximize?
#299442
11/24/09 02:49
11/24/09 02:49
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
OP
Member
|
OP
Member
Joined: Aug 2002
Posts: 164
Houston
|
I can start the program fullscreen, but I'd rather have it windowed, but maximize on startup. I can click the maximize button on the title bar, but I want it to auto do it and can't find the command. if there is on_maximize, then the engine should have a recognizable command to program into my code. any ideas? thanks
Black holes are where God divided by zero.
|
|
|
Re: auto maximize?
[Re: DJBMASTER]
#299450
11/24/09 05:13
11/24/09 05:13
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
OP
Member
|
OP
Member
Joined: Aug 2002
Posts: 164
Houston
|
Yeah, that might need a little more info. I'm hoping there's just a few lines I can put at the beginning of my main() function,
Black holes are where God divided by zero.
|
|
|
Re: auto maximize?
[Re: Nicholas]
#299452
11/24/09 06:15
11/24/09 06:15
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Try this...
video_window(vector(0,0,0),vector(sys_metrics(0),sys_metrics(1),0),112,NULL);
or
video_window(vector(1,0,0),vector(sys_metrics(0),sys_metrics(1),0),112,NULL);
Last edited by DJBMASTER; 11/24/09 06:16.
|
|
|
Re: auto maximize?
[Re: DJBMASTER]
#299453
11/24/09 06:30
11/24/09 06:30
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
OP
Member
|
OP
Member
Joined: Aug 2002
Posts: 164
Houston
|
I knew how to do that since a few versions back, but unfortunately it doesn't maximmize and it also doesn't account Thanks, but I mean the actual maximize function.
Black holes are where God divided by zero.
|
|
|
Re: auto maximize?
[Re: Espér]
#301329
12/09/09 17:00
12/09/09 17:00
|
Joined: Aug 2002
Posts: 164 Houston
Nicholas
OP
Member
|
OP
Member
Joined: Aug 2002
Posts: 164
Houston
|
add this before the main function
//////////// used to sync the mouse properly
function on_maximize_event() // adapt the engine resolution to the window size
{ RECT r; GetClientRect(hWnd,&r); video_set(r.right,r.bottom,0,0); }
function on_resize_event() // adapt the engine resolution to the window size
{ RECT r; GetClientRect(hWnd,&r); video_set(r.right,r.bottom,0,0); }
I'm also using mouse_sync in the main function after the level load and auto maximize. if it still doesn't work, search the forum for this code and you'll find the working example. This is what I am using and it works great.
Last edited by Nicholas; 12/09/09 17:02.
Black holes are where God divided by zero.
|
|
|
|