FutureBasic Logo

<<    Index    >> FutureBasic 5

FBGetScreenRect   function



Syntax:
ignored = fn FBGetScreenRect(rect)

Description:
Before MacOS X, we were able to extract the content rectangle of a window using the following code:
// rem does not work in MacOS X
dim @t,l,b,r
BlockMove window(_wndPointer)+portRect,@t,8

This no longer works because the window pointer and the grafport have been separated into different structures. You can substitute this simple function in your programs and it will work in all supported versions of the system software.
dim @t,l,b,r // old style rectangle
fn FBGetScreenRect(t)

or...
dim r as Rect // new style rectangle
fn FBGetScreenRect(r)