Here's a simple skeleton window program. (I'm trying out Microsoft window style codes rather than the rather verbose PB constants).
Code: Select all
Define.l win,run
; some window style flags in Microsoft magic number format ..
; System Menu only                $c80000
; Minimize                        $ca0000
; Maximize                        $c90000
; Sizeable                        $c40000
; Centred on screen               1
; Centred in Parent Window        2
; System, Min, Max                $cb0000
; System, Min, Max and Sizeable   $cf0000
OpenWindow(win, 0, 0, 300, 200, "Window Skeleton ", $c80001)    
SetWindowColor(win, RGB(50,120,180)) 
ButtonGadget(1,120,140,60,25,"Exit")
run = 1
Repeat
  
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      run = 0
      
    Case #PB_Event_Gadget
      Select EventGadget()
        Case 1
          run = 0
      EndSelect
  EndSelect
  
Until run = 0
End
best wishes,
Graham





