i am 2 weks buzy white winapi in pure mode and this is realy hard for me

i got the menu end a popup_window for changeing colors but now i dont get te data from the windows inside the windows

if somewane know i idee that would be great

Code:


function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam);

HMENU menu;
HMENU hSubMenu;
HMENU tmenu;

HWND test;

char szFile[MAX_PATH];
char* text[3];
int len;

#define WS_EX_TOOLWINDOW 0x80
#define WS_EX_CONTROLPARENT 0x10000
#define WS_EX_WINDOWEDGE 0x100
#define ES_NUMBER 0x2000
#define BS_NOTIFY 0x4000

RECT recta;

void set_api_main()
{
	wait(1);
	
	on_scanmessage = MyMessageFunction;
	
	menu=CreateMenu();
	hSubMenu=CreateMenu();
	tmenu=CreateMenu();
	
	
	//file  1-19
	InsertMenu(hSubMenu,0,MF_BYPOSITION|MF_STRING,1,"new");
	InsertMenu(hSubMenu,1,MF_BYPOSITION|MF_SEPARATOR,0,"");
	
	InsertMenu(hSubMenu,2,MF_BYPOSITION|MF_STRING,2,"load");
	InsertMenu(hSubMenu,3,MF_BYPOSITION|MF_SEPARATOR,0,"");
	
	InsertMenu(hSubMenu,4,MF_BYPOSITION|MF_STRING,3,"save");
	InsertMenu(hSubMenu,5,MF_BYPOSITION|MF_STRING,4,"save as...");
	
	InsertMenu(hSubMenu,6,MF_BYPOSITION|MF_SEPARATOR,0,"");
	InsertMenu(hSubMenu,20,MF_BYPOSITION|MF_STRING,19,"quit");
	//end file
	
	InsertMenu(menu,0,MF_BYPOSITION|MF_STRING|MF_POPUP,hSubMenu,"file");
	InsertMenu(menu,1,MF_BYPOSITION|MF_STRING,20,"run");
	
	
	SetMenu(hWnd,menu);
	
	//Change Window style to activate Maximize button
	SetWindowLong(hWnd,GWL_STYLE,WS_SYSMENU+WS_CAPTION+WS_MAXIMIZEBOX);
	ShowWindow(hWnd,SW_SHOWMAXIMIZED);
	UpdateWindow(hWnd);
	
	
	//-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
	//-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
	GetClientRect(hWnd,&recta);
	debuga[2] = recta.right;
	
	HWND headwindow = CreateWindowEx(NULL,"STATIC","",WS_VISIBLE | WS_POPUP | WS_EX_CONTROLPARENT,recta.right-180,40,180,80,hWnd,NULL,hInstance,NULL);	
	
	
	HWND test3 = CreateWindowEx(NULL ,"STATIC","rgba",WS_VISIBLE | WS_CHILD,10,10,50,20,headwindow,50,hInstance,NULL);
	test = CreateWindowEx(NULL ,"EDIT","1",ES_WANTRETURN | ES_NUMBER | WS_VISIBLE | WS_CHILD | WS_BORDER | CBS_DROPDOWN,10,30,30,20,headwindow,NULL,hInstance,NULL);
	HWND test1 = CreateWindowEx(NULL ,"EDIT","2",ES_WANTRETURN | ES_NUMBER | WS_VISIBLE | WS_CHILD | WS_BORDER | CBS_DROPDOWN,50,30,30,20,headwindow,NULL,hInstance,NULL);
	HWND test2 = CreateWindowEx(NULL ,"EDIT","4",ES_WANTRETURN | ES_NUMBER | WS_VISIBLE | WS_CHILD | WS_BORDER | CBS_DROPDOWN,90,30,30,20,headwindow,NULL,hInstance,NULL);
	HWND test4 = CreateWindowEx(NULL ,"EDIT","8",ES_WANTRETURN | ES_NUMBER | WS_VISIBLE | WS_CHILD | WS_BORDER | CBS_DROPDOWN,130,30,30,20,headwindow,NULL,hInstance,NULL);
	HWND test5 = CreateWindowEx(NULL ,"BUTTON","oke",WS_VISIBLE,10,60,150,20,hWnd,NULL,hInstance,NULL);
}

function open_a()
{
//	char szFile[MAX_PATH];
	ZeroMemory(szFile, MAX_PATH);
	OPENFILENAME ofn;
	ZeroMemory(&ofn, sizeof(OPENFILENAME));
	ofn.lStructSize	= sizeof(OPENFILENAME);
	ofn.Flags		= OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
	ofn.lpstrFilter	= ".txt\0*.txt\0All\0*.*\0";
	ofn.lpstrTitle	= "Open";
	ofn.lpstrFile	= szFile;
	ofn.nMaxFile	= MAX_PATH;
	
	if ( GetOpenFileName(&ofn) )
	{
	load_file(_str(szFile));
	}
}

function save_a()
{
//	char szFile[MAX_PATH];
	ZeroMemory(szFile, MAX_PATH);
	OPENFILENAME ofn;
	ZeroMemory(&ofn, sizeof(OPENFILENAME));
	ofn.lStructSize	= sizeof(OPENFILENAME);
	ofn.Flags		= OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_OVERWRITEPROMPT;
	ofn.lpstrFilter	= ".txt\0*.txt\0All\0*.*\0";
	ofn.lpstrTitle	= "save as...";
	ofn.lpstrFile	= szFile;
	ofn.nMaxFile	= MAX_PATH;
	
	if ( GetSaveFileName(&ofn) )
	{
		save_file(_str(szFile));
	}
}

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam)
{
	if(message == WM_COMMAND)
	{
		debuga[0] += 1;
		
		//file
		if(wParam == 1){new();}
		
		if(wParam == 2){open_a();}
		
		if(wParam == 3)
		{
		//	if()
		//	save_file(_str(szFile));
		}
		
		if(wParam == 4)
		{
			save_a();
		}
		
		if(wParam == 19)
		{
			sys_exit("");
		}
		//end file
		
		//run
		if(wParam == 20)
		{
		st_mode += 1;
		st_mode %= 2;
		onload = 0;
		if(!st_mode){HiliteMenuItem(hWnd,menu,20,MF_UNHILITE);}
		else{HiliteMenuItem(hWnd,menu,20,MF_HILITE);}
		}
		
		if(wParam == 20)
		{
		len = GetWindowTextLength(test) + 1;
		GetWindowText(test, text, len);
		}
	}
}




"empty"