Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menubar rect



At 11:06 AM -0800 12/29/01, Eric Schlegel wrote:

On Thursday, December 27, 2001, at 08:25 AM, Matt Neuburg wrote:

What, if any, is the incantation that will tell me the rect of the
menubar's frame? I want to know whether a point is in the menubar. Thx - m.

I don't think there's any API for determing the menubar rect, so I would suggest using the Carbon API FindWindow (in MacWindows.h); it returns inMenuBar if the specified point is in the menubar.

If you are going to use Carbon APIs you could get the main device. The menubar rectangle is then

(0, 0) to (screen width, menu bar height)

The proble you may have is that the quickdraw coordinate system is inverted with respect to the default core graphics / NSView coordinate system.

Jim


References: 
 >Re: menubar rect (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.