Futurebasic/Language/Reference/fbgetcontrolrect
Appearance
(Redirected from Futurebasic/language/reference/fbgetcontrolrect)
FBGETCONTROLRECT function
[edit | edit source]FBGETCONTROLRECT
[edit | edit source]Function
[edit | edit source]✔ Appearance ✔ Standard ✔ Console
Syntax
[edit | edit source]ignored = FN FBGETCONTROLRECT(cHndl&, rect)
Revised
[edit | edit source]August, 2002 (Release 7)
Description
[edit | edit source]Before OS X, we were able to extract the content rectangle of a button using the following code:
// REM does not work in OS X
DIM @t,l,b,r
BLOCKMOVE BUTTON&(_btnRefNum)+_contrlrect,@t,8
Carbon programs do not offer the ability to peek into structures like control records. FB 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)
or...
DIM r AS RECT // new style rectangle
FN FBGETCONTROLRECT(BUTTON&(_thebutton), r)