Re: menubar rect
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