Code: Select all
Declare Open_Window_0()
;- Window Constants
;
#Window_0 = 0
#BS_FLAT = $8000
#GWL_STYLE = - 16
#WS_CHILD = $40000000
;- Gadget Constants
;
#Gadget_0 = 0
Procedure Open_Window_0()
If OpenWindow(#Window_0, 251, 249, 191, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Flat Button")
If CreateGadgetList(WindowID())
ButtonGadget(#Gadget_0, 25, 100, 140, 40, "Flat Button")
setwindowlong_(GadgetID(#gadget_0), #GWL_STYLE, #BS_FLAT)
HideGadget(#Gadget_0, 0) ; Need to redraw the gadget after changing it's style :(
EndIf
EndIf
EndProcedure
open_window_0()
Repeat
Event = WaitWindowEvent()
Until Event = #PB_EventCloseWindow
Code: Select all
Declare Open_Window_0()
;- Window Constants
;
#Window_0 = 0
#BS_FLAT = $8000
;- Gadget Constants
;
#Gadget_0 = 0
Procedure Open_Window_0()
If OpenWindow(#Window_0, 251, 249, 191, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Flat Button")
If CreateGadgetList(WindowID())
ButtonGadget(#Gadget_0, 25, 100, 140, 40, "Flat Button",#BS_FLAT)
EndIf
EndIf
EndProcedure
open_window_0()
Repeat
Event = WaitWindowEvent()
Until Event = #PB_EventCloseWindow