Task

Create a window that has:

   a label that says   "There have been no clicks yet" 
   a button that says   "click me"


Upon clicking the button with the mouse, the label should change and show the number of times the button has been clicked.




      INSTALL @lib$+"WINLIB2"
      INSTALL @lib$+"WINLIB5"
 
      window% = FN_newdialog("Rosetta Code", 100, 100, 120, 52, 8, 1000)
      PROC_static(window%, "There have been no clicks yet", 100, 10, 10, 100, 14, 0)
      PROC_pushbutton(window%, "Click me", FN_setproc(PROCclick), 40, 30, 40, 16, 0)
      PROC_showdialog(window%)
 
      REPEAT
        WAIT 1
      UNTIL !window% = 0
      QUIT
 
      DEF PROCclick
      PRIVATE clicks%
      clicks% += 1
      SYS "SetDlgItemText", !window%, 100, "Number of clicks = " + STR$(clicks%)
      ENDPROC