[futurebasic] Re: [FB] detect mouse in floating window

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2011 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Sun, 4 Sep 2011 10:48:37 -0700
On Sep 4, 2011, at 9:53 AM, Steve wrote:

> What handler can I install on a window to detect a mouse click or when the mouse is in the content region of the floating window which has the WindowAttribute _kFloatingWindowClass?


I would install a window handler for _kEventMouseDown ( but you can also pick other other mouse events - see kEventClassMouse in Tlbx CarbonEvents.incl ) to get a click and then in the handler check the coordinates of the mouse click to see if it is within the content region. Code has been posted on this topic many times and there is a Carbon Event example that should enable you to develop your own code.



Brian S