{***********************************************************************}
{									}
{ __RemMnu    Remove a menu						}
{									}
{ function  __RemMnu(MenuPtr : _MenuPtr) : boolean;			}
{									}
{	      MenuPtr	Pointer to a _Menu structure			}
{									}
{ Description This function removes the menu pointed to by MenuPtr	}
{	      from the curent display page.  First the menu's window	}
{	      is made current with __TopWin, then removed with		}
{	      __RemWin. If MenuPtr does not point to a valid		}
{	      _Menu structure, or if the menu's window cannot be made	}
{	      current or cannot be removed, the function returns FALSE. }
{	      __ZapMnu removes a menu and its associated structures	}
{	      from memory.						}
{									}
{	      On error _MenuError may be set to:  _InvalidWindow	}
{						  _InvalidMenu		}
{									}
{ Version     4.00 (C)Copyright Blaise Computing Inc. 1987		}
{_______________________________________________________________________}

function __RemMnu(MenuPtr : _MenuPtr) : boolean;

  begin {__RemMnu}

    __RemMnu := FALSE;

    if (ValidSig(MenuPtr,MENUSIG_)) then
       if (__TopWin(MenuPtr^._MWinPtr)) then
	  if (__RemWin) then
	     __RemMnu := TRUE
	  else
	     SetMenuError(_InvalidWindow);

  end;	{__RemMnu}
