[comp.sys.mac.programmer] Drawing in the menu bar, again

jjoshua@topaz.rutgers.edu (Jon Joshua) (07/06/90)

I want to draw something into the menu bar.  Is there a way that I
could use CopyBits() to do the dirty work?  I am stuck because
CopyBits() clips and does not include the menu bar.


Thanks,
JOn.
-- 
                        /\                    ?               ________________ 
jjoshua@topaz.rutgers.edu \  ____   __       fgu             |.signature under|
 Anything is possible...   \ |  |  / |     orywlut-          |  construction  |
                            ==========    gfgsdfsdfsd        |________________|
_____________________________OO_____O___hfdhksjdhfksjdfs_______||__________||__

russotto@eng.umd.edu (Matthew T. Russotto) (07/06/90)

In article <Jul.5.18.28.10.1990.11429@topaz.rutgers.edu> jjoshua@topaz.rutgers.edu (Jon Joshua) writes:
>
>I want to draw something into the menu bar.  Is there a way that I
>could use CopyBits() to do the dirty work?  I am stuck because
>CopyBits() clips and does not include the menu bar.

All you need to do to draw in the Menubar is open a grafport, set its
PortRect to the menu bar area, and modify the visrgn to include the menu
bar area.  (Note: Use a GrafPort, NOT a window).
(if my .signature is messed up, ignore it-- it's an NFS bug)
--
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
][, ][+, ///, ///+, //e, //c, IIGS, //c+ --- Any questions?
		Hey!  Bush has NO LIPS!

stevec@Apple.COM (Steve Christensen) (07/07/90)

In article <Jul.5.18.28.10.1990.11429@topaz.rutgers.edu> Jon Joshua writes:
>I want to draw something into the menu bar.  Is there a way that I
>could use CopyBits() to do the dirty work?  I am stuck because
>CopyBits() clips and does not include the menu bar.

Yes, and it's really easy.  First, save the clipRgn of the port you're drawing
into, and then set it to something big enough to include the menu bar.
Something like a rectangle with bounds (-32700,-32700,32700,32700) should do.
Do the CopyBits() as usual, then restore the clipRgn.

steve