[Main]
Name=MenuEnd
Type=Function
Subtype=ROM Call
Header Files=menus.h
Definition=void MenuEnd (HANDLE ExecHandle);
See Also=menus.h/MenuBegin, menus.h/MenuKey

[ROM Call]
Index=$38

[Description]
Deallocates an executable menu structure and removes the menu from the screen.

[Explanation]
MenuEnd deletes the structure needed for executing the toolbar menu (such a structure
is created using <A HREF="$$LINK(menus.h/MenuBegin)">MenuBegin</A>), and removes the menu from
the screen by filling the menu area with blank pixels (except if the
<A HREF="$$LINK(menus.h/MenuBeginFlags)">MBF_NO_DRAWTOP</A> flag was passed to <A HREF="$$LINK(menus.h/MenuBegin)">MenuBegin</A>).
Note that it never restores the
background which was present before the menu was drawn; you must do this manually. If
the menu was drawn at the top of the screen (as usually), calling <A HREF="$$LINK(menus.h/MenuUpdate)">MenuUpdate</A>
may help. Also note that MenuEnd does not remove the structure created using
<A HREF="$$LINK(menus.h/MenuNew)">MenuNew</A> unless you used the <A HREF="$$LINK(menus.h/MenuBeginFlags)">MBF_HMENU</A> flag;
you must call <A HREF="$$LINK(alloc.h/HeapFree)">HeapFree</A> to remove it.

[References]
In=bascmd.h/cmd_toolbar, dialogs.h/Dialog, events.h/EV_defaultHandler, events.h/handleVarLinkKey, unknown.h/CustomEnd
Out=alloc.h/HeapFree, graph.h/ScrRect, graph.h/ScrRectFill
