MenuEnd Function (ROM Call 0x38)

menus.h

void MenuEnd (HANDLE ExecHandle);

Deallocates an executable menu structure and removes the menu from the screen.

MenuEnd deletes the structure needed for executing the toolbar menu (such a structure is created using MenuBegin), and removes the menu from the screen by filling the menu area with blank pixels (except if the MBF_NO_DRAWTOP flag was passed to MenuBegin). 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 MenuUpdate may help. Also note that MenuEnd does not remove the structure created using MenuNew unless you used the MBF_HMENU flag; you must call HeapFree to remove it.


Uses: HeapFree, ScrRect, ScrRectFill
Used by: cmd_toolbar, Dialog, EV_defaultHandler, handleVarLinkKey, CustomEnd


See also: MenuBegin, MenuKey