Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 1,213 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 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