• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: menubar rect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menubar rect


  • Subject: Re: menubar rect
  • From: Jim Correia <email@hidden>
  • Date: Sat, 29 Dec 2001 19:24:46 -0500

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


  • Follow-Ups:
    • Re: menubar rect
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: menubar rect (From: Eric Schlegel <email@hidden>)

  • Prev by Date: NSTask and readInBackgroundAndNotify
  • Next by Date: The Quit menu item
  • Previous by thread: Re: menubar rect
  • Next by thread: Re: menubar rect
  • Index(es):
    • Date
    • Thread