Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
using Windows ComboBox??? #317626
04/01/10 15:56
04/01/10 15:56
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
hi there..

I found this on the MSDN Mainpage:
Windows ComboBox Class

Now i wanna know if someone knows, how to use this combobox in Lite-C, too.
Cause it would be great for me to have a dropdown-box like this in my 2D Editor ( saves space ).


*hope for help*


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: using Windows ComboBox??? [Re: Espér] #317629
04/01/10 16:01
04/01/10 16:01
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
it is a .Net framework class library, i doubt it will be possbible to show on a gamestudio screen(at least with an easy way.)

you can try to program a combobox using panels and buttons yourself, or use c# wrapper and visual c# express. This would require to rewrite your application c# though.


3333333333
Re: using Windows ComboBox??? [Re: Espér] #317630
04/01/10 16:02
04/01/10 16:02
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
That's a .NET framework control, good luck getting that into Lite-c.

They are however based upon win32 controls which can be created easily through the winAPI. Problem is the rendering conflict with DirectX.

I have managed to create a button in my lite-c program, but it is only visible slightly when clicked.

The DirectX renderer would have to be disabled I think.

Either way, if you defintely want controls in your program, then take a look at the C# wrapper.

Re: using Windows ComboBox??? [Re: DJBMASTER] #317640
04/01/10 16:34
04/01/10 16:34
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
means i´m able to create such a Menü:


but no Combobox or dropdown list o.O ?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: using Windows ComboBox??? [Re: Espér] #317641
04/01/10 16:39
04/01/10 16:39
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
it is outside the directx window.


3333333333
Re: using Windows ComboBox??? [Re: Quad] #317650
04/01/10 17:15
04/01/10 17:15
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
To make Windows controls work, you must not render in the areas where they are. This means you have to set the background colour to black and have no view/panel etc. in this area.
And of course you have to create it by using normal WINAPI functions and not with .NET classes.

Re: using Windows ComboBox??? [Re: Lukas] #317651
04/01/10 17:21
04/01/10 17:21
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Ok
other idea...

Can i create a Second, Third, fourth...etc Project, wich only contains the Menü + framepanel. Call it via exec everytime i Need the list (like a popup window, just As a programm)?

If Yes, how can i Tell the mainprogramm, wich Object i've choosen in the popup Programm?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: using Windows ComboBox??? [Re: Espér] #317657
04/01/10 17:37
04/01/10 17:37
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
You can, but you should also be able to create subwindows in GS. There should be no problems, there are only problems if you put Windows controls in the window in which the engine renders.
However, to make two programs communicate, you can use SendMessage. But I think that's not neccessary.

Re: using Windows ComboBox??? [Re: Lukas] #317660
04/01/10 17:46
04/01/10 17:46
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Subwindows o.O

can you give me an example Code?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: using Windows ComboBox??? [Re: Espér] #317758
04/02/10 12:30
04/02/10 12:30
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
white win api you can create this

i just copied and paste this from a project and deleted some stuff so it might not work but this is how it would need to be

and maby i didnt delete enough.


Code:
long ScanMessage(UINT message, WPARAM wParam, LPARAM lParam);

HMENU menu;
HMENU hSubMenu;
HMENU iSubMenu;

HWND headwindow;
HWND* color_menu[36];

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

var headwindow_size = 80;

#define WS_EX_TOOLWINDOW 0x80
#define WS_EX_CONTROLPARENT 0x10000
#define WS_EX_WINDOWEDGE 0x100
#define WS_EX_LEFT 0x00000000

#define ES_NUMBER 0x2000
#define BS_NOTIFY 0x4000

#define SS_SUNKEN 0x00001
#define BST_CHECKED 0x0001
#define BST_UNCHECKED 0x0000 

RECT recta;

DWORD flag_edit_st;
DWORD flag_text_st;
DWORD flag_checkbox_st;
DWORD flag_edit;
DWORD flag_text;

void set_api_main()
{
	wait(1);
	
	on_scanmessage = ScanMessage;
	
	menu=CreateMenu();
	hSubMenu=CreateMenu();
	iSubMenu=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
	
	//insert 20-39
	InsertMenu(iSubMenu,1,MF_BYPOSITION|MF_STRING,20,"Field from image");
//	InsertMenu(iSubMenu,0,MF_BYPOSITION|MF_SEPARATOR,0,"");
	//end insert
	
	//main_menu
	InsertMenu(menu,0,MF_BYPOSITION|MF_STRING|MF_POPUP,hSubMenu,"File");
	InsertMenu(menu,1,MF_BYPOSITION|MF_STRING|MF_POPUP,iSubMenu,"Insert");
	InsertMenu(menu,2,MF_BYPOSITION|MF_STRING,40,"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);
	
	video_set(recta.right-recta.left,recta.bottom-recta.top-sys_metrics(SM_CYCAPTION), 32,2);
	
	SetForegroundWindow(hWnd);
}

long ScanMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
	
	if(message == WM_MOVE)
	{
		GetWindowRect(hWnd,&recta);
		SetWindowPos(headwindow,NULL,recta.right-180,recta.top+43,180-3,headwindow_size,NULL);
	}
	
	if(message == WM_COMMAND)
	{
		
		if(wParam == 19){sys_exit("");}
		
		//run
		if(wParam == 40)
		{
		if(!st_mode){HiliteMenuItem(hWnd,menu,40,MF_UNHILITE);}
		else{HiliteMenuItem(hWnd,menu,40,MF_HILITE);}
		}
	}
}



hope it helps


"empty"
Page 1 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | 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