Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!uvaarpa!mcnc!unc!steele
From: steele@unc.cs.unc.edu (Oliver Steele)
Newsgroups: comp.sys.mac
Subject: Re: One Quick and Dumb ?
Message-ID: <2254@unc.cs.unc.edu>
Date: Wed, 2-Dec-87 17:12:07 EST
Article-I.D.: unc.2254
Posted: Wed Dec  2 17:12:07 1987
Date-Received: Sun, 6-Dec-87 04:15:33 EST
References: <12355061423032@G.BBN.COM> <35264@sun.uucp>
Reply-To: steele@unc.UUCP (Oliver Steele)
Organization: University of North Carolina, Chapel Hill
Lines: 43

The Druid (dredick@bbn.com) writes:
>  I have always wanted to write an application that does not use
>  the menu bar but instead DRAW USING THE FULL MAC SCREEN including
>  where the menu bar is. [...]

The easy way:
	GrafPort  myPort;
	OpenPort(&myPort);

The slightly more difficult way:
	WindowPtr myWindow;
	Rect	  bounds;
	GrafPort  myPort;

	OpenPort(&myPort);
	bounds = myPort->portRect;
	ClosePort(&myPort);
	myWindow = NewWindow(0,&bounds,"\palmost always invisible :-)",
			false,0,-1,false,0);
	RectRgn(window.port.visRgn, &bounds);
	ShowWindow(window);

The advantage of the second way is that when the window goes away,
whatever was behind it is redrawn (you still need to do the menu bar and
desktop corners explicitly).  This way you can use it in a da or
multifinder-friendly application.

chuq@sun.UUCP (Chuq Von Rospach) writes:
>I wouldn't recommend this, as it will cause the application to break under
>Multifinder.

You can still use the second way above.  I think it's pretty rude to do
this, so I check for the presence of MultiFinder to decide whether to
grab the whole screen or just throw up a window.  You should probably
either do this or only use the whole screen if the user requests.

------------------------------------------------------------------------------
Oliver Steele				  ...!{decvax,ihnp4}!mcnc!unc!steele
							steele%unc@mcnc.org

	"Life isn't fair.  It's just fairer than death, that's all."
							-- William Goldman
							  _The Princess Bride_