ignored = fn FBGetControlRect(cHndl&, rect)
Before MacOS X, we were able to extract the content rectangle of a button using the following code:
// rem does not work in MacOS X
Carbon programs do not offer the ability to peek into structures like control records. FutureBasic provides this utility function for use in any program so that you may extract the rectangle regardless of the current version of system software.
dim @t,l,b,r // old style rectangle
fn FBGetControlRect(button&(_thebutton), t)
dim r as Rect // new style rectangle
fn FBGetControlRect(button&(_thebutton), r)