Windows

Discussions related to mouse, keyboard, fonts and Graphical User Interface
Ric
Posts: 200
Joined: Tue 17 Apr 2018, 21:03

Windows

Post by Ric »

Hi guys/gals,
I have been trying to create a window to allow a secondary output using similar code to this

Code: Select all

      MODE 1
      INSTALL @lib$+"WINLIB5"
      window% = 0
      class$="One"
      text$="Succeeded"
      x%=10
      y%=10
      cx%=200
      cy%=200
      id%=1
      style%=0
      exst% =0
      window% = FN_createwindow(class$,text$,x%,y%,cx%,cy%,id%,style%,exst%)
      ON ERROR PRINT window% : PROCCloseWindow : END
      ON CLOSE PROCCloseWindow : QUIT
      REPEAT
      UNTIL FALSE
      END

      DEF PROCCloseWindow
      PROC_closewindow(window%)
      ENDPROC
Can anyone explain why it doesnt work, must be something simple as the code for creating the window is copied straight out of the manual.
Kind Regards
Ric
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
RichardRussell

Re: Windows

Post by RichardRussell »

Ric wrote: Fri 10 Apr 2020, 15:05 Can anyone explain why it doesnt work
Probably because class$ is set to "One" which (as far as I know) is not the name of any window class; try something like "Edit" or "Static". There's a list of standard window classes here; you can define your own but I'm assuming you've not done that.

(User Interface would be a more appropriate place for this thread. Perhaps the forum's admin would move it out of Miscellaneous).
Ric
Posts: 200
Joined: Tue 17 Apr 2018, 21:03

Re: Windows

Post by Ric »

Thanks
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
DDRM

Re: Windows

Post by DDRM »

>User Interface would be a more appropriate place

Worked it out eventually...

:)

D
RichardRussell

Re: Windows

Post by RichardRussell »

DDRM wrote: Mon 13 Apr 2020, 09:11 Worked it out eventually...
Thanks!
Ric
Posts: 200
Joined: Tue 17 Apr 2018, 21:03

Re: Windows

Post by Ric »

Now we are in the correct place, i have a poser.

Is it possible to remove a pop up menu once it has been created? So that it can be removed from the display window.

Regards Ric
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
RichardRussell

Re: Windows

Post by RichardRussell »

Ric wrote: Tue 14 Apr 2020, 19:58Is it possible to remove a pop up menu once it has been created?
It's a long time since I've done any of this stuff, but I think RemoveMenu and DestroyMenu can be used with any menu. It's possible that you might need to redraw the menu bar afterwards to remove it visibly, but I'm not sure about that.
Ric
Posts: 200
Joined: Tue 17 Apr 2018, 21:03

Re: Windows

Post by Ric »

Thanks Richard
Sorry for the slow response, I have had tough things to deal with at work, like so many others.
Regards
Ric
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023