Gamestudio Links
Zorro Links
Newest Posts
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
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, 1 invisible), 703 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 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 | 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