[futurebasic] Re: [FB] OSX Button Draw bug

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Tue, 18 May 2004 15:41:11 -0400
  n Graphic Background"
>  Note: I had mega issues with setting up my windows to get mouse 
> clicks using all this in my own dialogs...I ended up trapping the 
> carbon event in the window handler for_kMouseDown, verifying if a 
> compositing window was about using my particular Fn WindowExists...  
> and if one was about, sending things on to my DoMouse from there

That should have been  _kEventMouseDown, sorry.

In  fn WindowEventHandler :

case _kEventMouseDown
if FN WindowExists(_WhateverWindow)     then window 
  FN DoMouse // My mouse handler as usual

result = FN CallNextEventHandler(nextHandler,theEvent)

Works at least and keeps Carbon Window handler windows cooexisting ok 
with the rest of my 2,304,003 other non-carbon windows.

You could also use wNum   = fn FBGetWndNumber( w ) in that same handler 
to know what's what and where too.

Someday a kinder gentler FB runtime might just handle all this for you. 
  I don't know if how I handle things is optimal, I just know that it 
got my little triangle sliders moving again in my custom filter dialogs 
and restored much life to normal. Cursor control may also be 
problematic though, as having a carbon event window handler puts most 
outside of the FB runtime stuff we are used to.