I use Quickwin a lot, but not usually with customizations to the menu bar. When I have tried this, I have been bamboozled by its interaction with child windows. Specifically, sometimes, a "rogue" window "Graphic1" is created, which persists throughout the program, as I am not able to delete it programmatically.
Recently through LOTS of trial & error study, I have learned how to control the problem, so I wanted to (a) share it, (b) find out if this is the normal behavior, and (c) suggest better documentation.
As explained in the documentation, child windows are invisible until they are written to, or if SETWINDOWCONFIG is called. What should be added to this list is customizing the menu bar using DELETEMENUQQ, APPENDMENUQQ, etc. Apparently, these calls attempt to display the current child window. If there is none, then it will create and display a "rogue" child window "for it's own use"?
Apparently, as I have found in various example programs I have found, these menu calls are commonly made *after* the creation of a child window using an OPEN call, for example OPEN (unit=1, file='USER). In this case, the menuqq calls execute with no problem: They don't actually write anything to the open window, although if nothing has yet been written, the window will be invisible, the menu call will make it visible, and it can then be deleted if the user wants.
But to me, it is generally logical to customize the menu bar before doing anything else with child windows, including any OPEN statements. This is when I run into trouble--the menuqq calls create this rogue window that is visible and persists, and resists efforts to CLOSE it. The solution is to code something like this:
PROGRAM MenuDemo
: various initializations
! Assume menu manipulations are the first thing to me done.
OPEN (0, file = 'USER')
lreturn = DELETEMENUQQ (menuno, itemno)
: Additional menuqq calls
CLOSE (0)
! Program continues
I wish I had discovered this years ago--would have saved me hours of frustration and coping.
Is this behavior well known or considered standard, or acceptable? I think the documentation should describe this undesirable side effect of the menuqq functions, along with some discussion of how to control it.