[MAXGUI] Sub-menu example?

BlitzMax Forums/BlitzMax Beginners Area/[MAXGUI] Sub-menu example?

the example just works.. what's strange about it?

this:
filemenu=CreateMenu("&File",0,WindowMenu(window))
creates the filemenu, not the whole menu, just the word 'File' on the menubar of a window. Therefor the parent is the WindowMenu(window).

same with
editmenu=CreateMenu("&Edit",0,WindowMenu(window))
and
helpmenu=CreateMenu("&Help",0,WindowMenu(window))

and then you simply add the filemenu to the File 'word'
hence:

CreateMenu"&New",MENU_NEW,filemenu,KEY_N,MODIFIER_COMMAND

likewise for the rest..