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.

AppGameKit Classic Chat / AGK Window managment

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 6th Feb 2012 16:05 Edited at: 6th Feb 2012 16:33
From what i seen till now, there are no basic window control commands in AGK. Those should be:



Are they planned for the future?

Currently it seems that making changes is possible, in Tier 2 changing Core.cpp and using
for example, to leave only titlebar & title on it, without any button on it. Other styles fail in showing up properly.

@EDIT

It's possible in Tier 2. + It works properly

[Tour]


1. Open up Core.cpp

2. Go to line no. 451

3. Change this:

into this:


4. Done.

And you're having a beauty window without any title bar.


@EDIT 2

Pooh. I've got the scale-window-to-screen size working.

GetDeviceWidth() and GetDeviceHeight() were returning 0 or 1, ~ Basically, they weren't working. So i changed this (From Core.cpp):



Into this:



This'll make it go screen size, yet using it's titlebar & not overlapping the task bar.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Feb 2012 17:14
I doubt these will be added into Tier 1 since they are very platform specific. This is some handy information for anyone wanting to rig the executable nicely for Windows though. Thanks for sharing!

kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 6th Feb 2012 17:29 Edited at: 6th Feb 2012 17:30
Here's a complete way on how to prepare a window such as AppGameKit IDE has:

In Core.cpp, function HWND CreateWin32Window, search for:
Quote: "dwStyle ="


When you find it, replace it with this:
Quote: "dwStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MAXIMIZE & (~WS_SIZEBOX);"


Then, replace those lines:



With those:


(Un-Comment both WindowRect to set the size manually, otherwise it'd be scaled to 'full screen'. Image below.)

Then just add this:


Under line:
Quote: "// show window"


And you're done.

Here's a screen:



This is very useful in my case, when I am producing an PC editor. It has to look good. The only thing left to solve for me, is the scaling, which is horrible in PC, full screen cases.
I'd rather set everything manually, or stretch the size.

Login to post a reply

Server time is: 2024-11-23 01:08:37
Your offset time is: 2024-11-23 01:08:37