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
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 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
minimize button? #375184
06/24/11 01:03
06/24/11 01:03
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
I've been looking for (unsuccessfully) the code to minimize the window without using the windows title bar.
Anyone have the code to minimize the window I can use in a function?

thanks in advance.


Black holes are where God divided by zero.
Re: minimize button? [Re: Nicholas] #375188
06/24/11 05:45
06/24/11 05:45
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Hi,

This is some code, I don't know if it is what you want. It use the win32 ShowWindow function.

Code:
#include <acknex.h>
#include <default.c>
#include <windows.h>

void do_minimize()
{
	wait(-2);
	ShowWindow(hWnd, SW_MINIMIZE);	// minimize
	wait(-2);
	ShowWindow(hWnd, SW_RESTORE);		// restore
	wait(-2);
	ShowWindow(hWnd, SW_MAXIMIZE);	// maximize
	wait(-2);
	ShowWindow(hWnd, SW_RESTORE);		// restore
	wait(1);
	error("Finished");
}

void main()
{
	wait(1); // wait for hWnd to be valid
	level_load("");
	
	do_minimize();
}





Best regards.

Re: minimize button? [Re: Nicholas] #375189
06/24/11 05:55
06/24/11 05:55
Joined: Mar 2009
Posts: 42
Dominican Republic
keilyn3d Offline
Newbie
keilyn3d  Offline
Newbie

Joined: Mar 2009
Posts: 42
Dominican Republic
include the windows.h and use:
SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);

example:
Code:
#include <acknex.h>
#include <windows.h>

function main()
{
	wait(1);
	SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}



Re: minimize button? [Re: keilyn3d] #375503
06/26/11 01:13
06/26/11 01:13
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
thanks, both of those work well.


Black holes are where God divided by zero.

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

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