Gamestudio Links
Zorro Links
Newest Posts
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
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
External window + engine window problem #343296
10/05/10 08:25
10/05/10 08:25
Joined: Mar 2009
Posts: 42
Dominican Republic
keilyn3d Offline OP
Newbie
keilyn3d  Offline OP
Newbie

Joined: Mar 2009
Posts: 42
Dominican Republic
hello, I am making a song lyrics presentation software for my church...

the software will have the controls in the first monitor and will show the song lyrics in the secondary monitor...

my problem is that I have made a window, that will have the controls, outside of the engine windows, but when I click the menu and the dropdown menu is show, the engine windows stop, and continue when I close the dropdown menu...

sorry for my english, I hope that you can understand me.

here is a sample, please clic in the file button in the menu, and look how the crazy red box stop...

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

//--------------------------------------------------

#define LPWSTR char*
#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
#define MAKEINTRESOURCE MAKEINTRESOURCEW
#define IDI_WINLOGO MAKEINTRESOURCE(32517)
#define BTN1 4000
//--------------------------------------------------

LRESULT CALLBACK WndProc2 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

//--------------------------------------------------

HWND hWnd1;
char cname[4] = {0x62, 0x6C, 0x61, 0};

//--------------------------------------------------

void controles();

void fwhile (){ 
	var x1 = 100;
	var x2 = 400;
	var y1 = 100;
	var y2 = 400;
	while(1){
		x2 += (-1 + random(1.99)) * 5;
		
		x1 += (-1 + random(1.99)) * 5;
		draw_line(vector(x1,y1,0),NULL,100); 
		draw_line(vector(x2,y1,0),vector(0,0,255),100);  
		draw_line(vector(x2,y2,0),vector(0,0,255),100); 
		draw_line(vector(x1,y2,0),vector(0,0,255),100); 
		draw_line(vector(x1,y1,0),vector(0,0,255),100);wait(1);
	}
}

void main ()
{
	d3d_lockable = 1;

	wait(1);
	video_window(vector(sys_metrics(0)/3.2,1,0),0,1,0);
	screen_color.blue = 255;
	screen_color.green = 128;

	fwhile();
	
	//--------------------------------------------------------
	WNDCLASS wc;
	wc.style = CS_HREDRAW | CS_VREDRAW;
	wc.lpfnWndProc = WndProc2;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = hInstance;
	wc.hIcon = LoadIcon (NULL, IDI_WINLOGO);
	wc.hCursor = LoadCursor (NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = cname;
	RegisterClass (&wc);
	
	hWnd1 = CreateWindowEx
	(
	0,
	cname,
	"3D Pressenter",
	(WS_OVERLAPPEDWINDOW | WS_SYSMENU) - (WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME),
	00, 00, 400, 600,
	hWnd,
	0,
	hInstance,
	0
	);

	ShowWindow   (hWnd1, SW_SHOWNORMAL);
	
	//---------------------------------------------
	controles();
	MSG msg;

}

void controles(){
	
	long hMenu = CreateMenu();
	long hSubMenu = CreateMenu();
	InsertMenu(hSubMenu,1,MF_BYPOSITION|MF_STRING,1,"Play");
	InsertMenu(hSubMenu,2,MF_BYPOSITION|MF_STRING,2,"Exit");
	InsertMenu(hMenu,0,MF_STRING|MF_POPUP,hSubMenu,"File");
	SetMenu(hWnd1,hMenu);
}



LRESULT CALLBACK WndProc2 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
		case WM_LBUTTONDOWN:
		screen_color.red = random(255);
		//sys_exit("");
		//
		case WM_DESTROY:
		sys_exit(NULL);
		//MessageBox(hWnd1,"bye","OK",MB_OK);
		case WM_COMMAND:
		switch (wParam){
			case 1:
			//	media_play("life.wmv", NULL, 100);
			
			case 2:
			sys_exit("");
			
		}
		return 0; 
	}
	return DefWindowProc (hwnd, message, wParam, lParam);
}



I check it playing a video in the engine windows, and the video stop, but the audio continue playing without problem...

thanks, I hope you can help me.

Last edited by keilyn3d; 10/05/10 08:27.
Re: External window + engine window problem [Re: keilyn3d] #343376
10/05/10 20:38
10/05/10 20:38
Joined: Mar 2009
Posts: 42
Dominican Republic
keilyn3d Offline OP
Newbie
keilyn3d  Offline OP
Newbie

Joined: Mar 2009
Posts: 42
Dominican Republic
why no one can help me?

my English is so bad?
my problem hasn't solution?

sick

Re: External window + engine window problem [Re: keilyn3d] #343377
10/05/10 20:40
10/05/10 20:40
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Be patient!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: External window + engine window problem [Re: Superku] #343383
10/05/10 21:05
10/05/10 21:05
Joined: Mar 2009
Posts: 42
Dominican Republic
keilyn3d Offline OP
Newbie
keilyn3d  Offline OP
Newbie

Joined: Mar 2009
Posts: 42
Dominican Republic
ok, I will wait


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