Jump to content

Futurebasic/Language/Reference/fbgetscreenrect

From Wikibooks, open books for an open world

FBGETSCREENRECT function

[edit | edit source]

FBGETSCREENRECT

[edit | edit source]

Function

[edit | edit source]

✔ Appearance ✔ Standard ✔ Console

Syntax

[edit | edit source]

ignored = FN FBGETSCREENRECT(rect)

Revised

[edit | edit source]

February, 2002 (Release 6)

Description

[edit | edit source]

Before OS X, we were able to extract the content rectangle of a window using the following code:

// REM does not work in OS 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)