Request: Hide/show menus, or multiple menus

BlitzPlus Forums/BlitzPlus Programming/Request: Hide/show menus, or multiple menus

Here is a hack. Switch the internal menu pointer with another window, then update the menu. You could even create extra windows and "steal" their menus. Simon said the next update would have a "hidden" CreateWindow() flag, so I think this will be a good solution:
window=CreateWindow("TEST",0,0,400,300)

CreateMenu("File",0,WindowMenu(window))
UpdateWindowMenu window

Delay 2000

ResetWindowMenu(window)
CreateMenu("Eat me",0,WindowMenu(window))
UpdateWindowMenu window

Delay 2000

Function ResetWindowMenu(window)
oldmenu=PeekL(window+140)
temp=CreateWindow("",0,0,400,300)
newmenu=PeekL(temp+140)
PokeL window+140,newmenu
PokeL temp+140,oldmenu
FreeGadget temp
End Function