Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!sdcsvax!ucsdhub!esosun!seismo!uunet!munnari!jkjl From: jkjl@munnari.oz (John Lim) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing in the menubar Summary: UnionRgn(windP->visRgn,WMgrPort->visRgn,windP->visRgn); Message-ID: <2589@munnari.oz> Date: 26 Nov 88 17:52:19 GMT References: <616@wasatch.UUCP> Organization: Comp Sci, Melbourne Uni, Australia Lines: 23 In article <616@wasatch.UUCP>, t-jacobs@wasatch.UUCP (Tony Jacobs) writes: > I'm sure this has passed through here before but could someone elaborate on > how to draw into the region where the menu is or drawing onto the whole screen. > I've been told that perhaps you need to skip doing a InitMenu and then do a > SetPort to the WMgrPort but that doesn't appear to do the trick. > > This is being done in Lightspeed C 3.0 so any C source would help but any > language could be interpreted providing the toolbox keyword appear. > Try this : { WindowPtr windP; windP = NewWindow(... with the bounds set the screenBits.bounds...); UnionRgn(windP->visRgn,WMgrPort->visRgn,windP->visRgn); } In normal windows the visRgn excludes the menubar, but the WMgrPort visRgn includes the whole screen. Since the regions are both in global coords, no problems doing an UnionRgn().