;
; **********************************
;
; Window example file for Pure Basic
;
;    © 1999 - Fantaisie Software -
;
; **********************************
;

WBStartup()                 ; This program could be launched from workbench

InitWindow(0)               ; We will need one window
*TagList = InitTagList(20)

; Fill up our taglist.
; !!! WARINING !!! You MUST use an title variable for EACH window

Title.s = "Demo Window Example"

   ResetTagList(#WA_Title , @Title)
If OpenWindow(0, 10, 80, 200, 150, #WFLG_CLOSEGADGET | #WFLG_DEPTHGADGET | #WFLG_DRAGBAR, *TagList)   ; If our window is opened...

  H = WindowHeight() ; Get some window informations
  W = WindowWidth()  ;
  X = WindowX()      ;
  Y = WindowY()      ;

  PrintN("Height:"+Str(H)+", Width:"+Str(W)+", Coords(X,Y): ("+Str(X)+","+Str(Y)+")")

  Delay(50)

  MoveWindow(100,0)

  Delay(50)

  SizeWindow(200,200)

  BevelBox(10,20,50,30,0)  ; Draw nice 3D box on our window
  BevelBox(10,60,50,30,1)  ;

  ; Wait for the user press the close gadget
  ;
  Repeat
    IDCMP.l = WindowEvent()
    VWait()
  Until IDCMP = #IDCMP_CLOSEWINDOW

EndIf

End
