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.
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
LoadLibraryA("GUILib.dll")
Next Post
window=CreateWindow( "GUI", 200, 200, 400, 300, 0, 2+64 ) control=CreateButton( "Button", 10, 10, 70, 26, window, 0 )
Gui=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 )