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
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 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.