1 registered members (TipmyPip),
18,388
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
hi there.. I found this on the MSDN Mainpage: Windows ComboBox ClassNow 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*
|
|
|
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
Senior Expert
|
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: Lukas]
#317651
04/01/10 17:21
04/01/10 17:21
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
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?
|
|
|
Re: using Windows ComboBox???
[Re: Espér]
#317758
04/02/10 12:30
04/02/10 12:30
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
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.
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"
|
|
|
|