GUILib
BlitzMax Forums/BlitzMax Programming/GUILib
| ||
I have a GUI DLL working. The commands are similar to BlitzPlus. The library uses gadget layouts, like BlitzPlus, gadget colors, as well as some extra gadget control commands.![]() |
| ||
. |
| ||
And? |
| ||
Well I assume BlitzMax can call a dll. |
| ||
Ok. Why i still wand to see what you have done? In code not and not in screanshot. |
| ||
Well I assume BlitzMax can call a dll. Yes it can, but you still need the dll to be able to call it ;) LINK PLEASE :) |
| ||
Soon. I need to finish up recursive resizing. |
| ||
Looks promising. Weird colors though =] |
| ||
What did you code this in ? yes you can call the dll in blitzmax yet i dont think you can if you created it in .net btw it looks good and 3D World Studio was very impressive. |
| ||
looks good halo ! |
| ||
It's C. Collaberation with a friend. |
| ||
Why i still wand to see what you have done? When he first posted this, he posted the DLL & the commands it supports.I downloaded it and tried it and found it to work as advertised. |
| ||
Why I miss all the fun?:< |
| ||
The original dll only had windows. I will have more when i post a new one. This is real windows controls, by the way, NOT DirectX drawing. |
| ||
Halo, is this DLL going to give us certain advantages over the BRL GUI lib that is being made? Thanks! |
| ||
That I couldn't tell you, and don't really want to take business away from BR, but this will probably be available sooner. I am primarily making this for my own use with BlitzPlus, but I will release it as a product if I can make few bucks off it. |
| ||
Okay, here you go: http://www.leadwerks.com/post/GUILib.dll No documentation. Commands are the same as BlitzPlus, except that I use "Control" instead of "Gadget". Supported: textfield combobox panel button checkbox listbox window SetControlLayout SetControlColor Use WaitEvent()=$803 to exit the program. Example: window=CreateWindow("GUI",200,200,400,300,0,2+64) setcontrolcolor(window,64,64,64,0,0,0) x=6 y=6 control=CreateButton("Button",x,y,70,26,window,0) setcontrolcolor(control,64,64,64,192,192,192) setcontrollayout(control,1,1,0,0) x=x+ControlWidth(control)+6 control=CreateLabel("Label",x,y+6,40,26,window,0) setcontrolcolor(control,64,64,64,192,192,192) setcontrollayout(control,1,1,0,0) x=x+ControlWidth(control)+6 control=CreateCheckBox("CheckBox",x,y,70,26,window,0) setcontrolcolor(control,64,64,64,192,192,192) setcontrollayout(control,1,1,0,0) x=x+ControlWidth(control)+6 control=CreateComboBox(x,y,ClientWidth(window)-x-6,26,window,0) setcontrollayout(control,1,1,1,2) x=x+ControlWidth(control)+6 setcontrolcolor(control,96,96,96,192,192,192) x=6 y=y+26+6 control=CreateListBox(x,y,ClientWidth(window)-2*x,100,window,0) setcontrollayout(control,1,1,1,0) y=y+ControlHeight(control)+6 setcontrolcolor(control,96,96,96,192,192,192) control=CreatePanel(x,y,ClientWidth(window)-2*x,80,window,1) setcontrollayout(control,1,1,1,0) setcontrolcolor(control,64,64,64,192,192,192) setcontroltext(control,"Panel") y=y+ControlHeight(control)+6 panel=control control=CreateTextField(x,y,120,20,window,0) setcontrollayout(control,1,1,1,0) setcontrolcolor(control,96,96,96,192,192,192) setcontroltext(control,"TextField") While WaitEvent()<>$803 Wend |
| ||
And here is an example executable: www.leadwerks.com/post/GUILib.exe |
| ||
........................ |
| ||
Andi still HEAVY METAL. greed. money. money. money .money |
| ||
Stupid Linux hippie. |
| ||
looks very nice,but unfortunatly i'm not able to use this great dll. would be nice when somebody will post a solution to import the dll. Or Halo would build a module :) edit: LoadLibraryA("GUILib.dll") |
| ||
And then? If you can't use the dll (ie no windows) you can't use the module as well as it uses WinAPI. You'll have to wait for the official GUI which is multiplatform then. |
| ||
This is how you do it in blitzmaxNext Post but i dont know what the params are so if you could post them here for me i could do the rest ex: CreateButton( hwnd:int, x:int, y:int, width:int, height:int, flags:int ) btw a module is possible as you might have saw the gui i created in blitzmax using pure winapi. |
| ||
how come when i load the dll with LoadLibraryA() then put nothing else and run it it still loads up the example |
| ||
All your parameters up there are correct except "hwnd" should be "parent" (they are not the same thing) and CraeteWindow also has a parent parameter. Comments? Demos? I would like to see this in use. There are definitely still bugs, but I am getting there. |
| ||
First thing is the demo window should'nt open when the dll is called. (edit) I will try find some other things. |
| ||
another bug, if i resize the window the button turns black with the following codewindow=CreateWindow( "GUI", 200, 200, 400, 300, 0, 2+64 ) control=CreateButton( "Button", 10, 10, 70, 26, window, 0 ) and all the gadgets seems to be moving abit with the window while i resize and i am not using the layout command so maby by default you should set the Left and Top to 1. The Panel doesnt seem to be updating because when you put another window over it for example it just draws the ugly bits in the panel |
| ||
The updated commandsGui=LoadLibraryA("GUILib.dll") Global CreateWindow( text$z, x:Int, y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreateWindow") Global CreateButton( text$z, x:Int, y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreateButton") Global CreateLabel( text$z, x:Int, y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreateLabel") Global CreateCheckBox( text$z, x:Int, y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreateCheckBox") Global CreateComboBox( x:Int, y:Int, w:Int, height:Int, parent:Int ,flags:Int)"win32"=getprocaddress(Gui,"CreateComboBox") Global CreateListBox( x:Int, y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreateListBox") Global CreatePanel( x:Int ,y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreatePanel") Global CreateTextField( x:Int, y:Int, w:Int, height:Int, parent:Int, flags:Int)"win32"=getprocaddress(Gui,"CreateTextField") Global SetControlLayout( parent:Int, Left, Top, Right, Bottom )"win32"=getprocaddress(Gui,"SetControlLayout") Global SetControlColor( parent:Int, br, bg, bb, tr, tg, tb )"win32"=getprocaddress(Gui,"SetControlColor") Global ControlWidth( parent:Int )"win32"=getprocaddress(Gui,"ControlWidth") Global ControlHeight( parent:Int )"win32"=getprocaddress(Gui,"ControlHeight") Global SetControlText( parent:Int , text$z )"win32"=getprocaddress(Gui,"SetControlText") window=CreateWindow( "GUI", 200, 200, 400, 300, 0, 2+64 ) control=CreateButton( "BUTTON", 10, 10, 70, 26, window, 0 ) SetControlText( control, "TEST" ) SetControlLayout( control, 1, 1, 0, 0 ) SetControlColor( control, 255,255,255,50,255,100 ) Print ControlWidth( control ) Print ControlHeight( control ) 'control=CreateLabel( "Label", 10, 10, 40, 26, window, 0 ) 'control=CreateCheckBox( "CheckBox", 10, 10, 70, 26, window, 0 ) 'control=CreateComboBox( 10, 10, 50, 26, window, 0 ) 'control=CreateListBox( 10, 10, 50, 100, window, 0 ) 'control=CreatePanel( 50, 50, 50, 80, window, 1 ) 'control=CreateTextField( 10, 10, 120, 20, window, 0 ) Repeat Until KeyHit( Key_Escape ) found a error if you use "SetControlColor( control, 255,255,255,50,255,100 )" then "SetControlText( control, "TEST" )" then SetControlText wont work unless you resize so just add UpdateWindow in the SetControlColor function. |