[comp.sys.mac.programmer] How to make disappearing menubar?

time@ice.com (Tim Endres) (04/10/91)

I know this was discussed here a couple weeks ago, but I can't find
it in my archives. How do I get the menu bar to disappear? I have
figured out the MenuBarHeight global, and it makes the menus not pickable
by the mouse, but I can't get the menu bar redrawn even though I call
DrawMenuBar(). What was the trick?

-------------------------------------------------------------
Tim Endres                |  time@ice.com
ICE Engineering           |  uupsi!ice.com!time
8840 Main Street          |  Voice            FAX
Whitmore Lake MI. 48189   |  (313) 449 8288   (313) 449 9208

mxmora@unix.SRI.COM (Matt Mora) (04/12/91)

From the UMPG:
                    { Get some Regions to work with}
    Save_Region := NewRgn;
    MBar_Region := NewRgn;
    SetMBarHeight(0);
{}
    CopyRgn(GetGrayRgn, Save_Region);
          { Fix up GrayRgn to cover the old GrayRgn plus the Menu Bar Rect}
    RectRgn(MBar_Region, MBar_Rect);
    UnionRgn(GetGrayRgn, MBar_Region, GetGrayRgn);
             { Paint and fix up visRgn for any windows with exposed area}
    theWindow := WindowPeek(FrontWindow);
    PaintOne(theWindow, MBar_Region);
    PaintBehind(theWindow, MBar_Region);
    CalcVis(theWindow);
    CalcVisBehind(theWindow, MBar_Region);
    DisposeRgn(MBar_Region);                          { Clean up, leave}

-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________