FindWindow equivalent?
FindWindow equivalent?
- Subject: FindWindow equivalent?
- From: Jonathan Wight <email@hidden>
- Date: Fri, 06 Sep 2002 17:26:55 -0500
I need to find which of my application's window's content is directly under
a certain pixel. Under Carbon I'd just use the venerable FindWindow()
function.
Under Cocoa I've tried quite a few methods. I've iterated through the array
returned by -[NSApplication windows] and checking the pixel location against
the frame of each window but if my pixel is obscured by another
application's window I still mistakenly my window contains the pixel.
So I've also used some CoreGraphics hackery to find the frames of all
visible windows of every application. But then if the window title obscures
my pixel I'm in the same position.
I've even tried using FindWindow itself thinking I might be able to go from
a WindowRef to an NSWindow but no luck.
So anyone know how to do FindWindow in Cocoa?
Jon.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.