External window + engine window problem

Posted By: keilyn3d

External window + engine window problem - 10/05/10 08:25

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.
Posted By: keilyn3d

Re: External window + engine window problem - 10/05/10 20:38

why no one can help me?

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

sick
Posted By: Superku

Re: External window + engine window problem - 10/05/10 20:40

Be patient!
Posted By: keilyn3d

Re: External window + engine window problem - 10/05/10 21:05

ok, I will wait
© 2024 lite-C Forums