Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
grstatus
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The grstatus function returns the status of the most recently used
graphics function. Return values less than 0 are errors, and values
greater than 0 are warnings.
The following symbolic constants are defined in the FGRAPH.FD
header file for use with the grstatus function:
Value Constant Meaning
0 $GROK Success
-1 $GRERROR Graphics error
-2 $GRMODENOTSUPPORTED Requested video mode not supported
-3 $GRNOTINPROPERMODE Requested routine works only in
certain video modes
-4 $GRINVALIDPARAMETER One or more parameters invalid
-5 $GRFONTFILENOTFOUND No matching font file found
-6 $GRINVALIDFONTFILE One or more font files invalid
-7 $GRCORRUPTEDFONTFILE One or more font files inconsistent
-8 $GRINSUFFICIENTMEMORY Not enough memory to allocate
buffer or to complete a _floodfill
operation
-9 $GRINVALIDIMAGEBUFFER Image buffer data inconsistent
1 $GRNOOUTPUT No action taken
2 $GRCLIPPED Output was clipped to viewport
3 $GRPARAMETERALTERED One or more input parameters was
altered to be within range, or
pairs of parameters were
interchanged to be in the proper
order
The functions listed below cannot give errors, and they all set
grstatus to $GROK:
displaycursor gettextposition outtext
getactivepage gettextwindow unregisterfonts
getgtextvector getvideoconfig wrapon
gettextcolor getvisualpage
The routines listed below are for graphics or text modes only. They
set grstatus to $GRNOTINPROPERMODE if in an incompatible mode, or
$GROK otherwise:
getcolor getviewcoord setlinestyle
getcurrentposition getwindowcoord settextcursor
getlinestyle getwritemode setviewcoord
getphyscoord imagesize
gettextcursor moveto
The graphics functions that affect grstatus are listed below. Also
shown are the error or warning messages that may be set by the
graphics function. In addition to these error codes, all of these
functions can produce the $GRERROR error code.
Function Possible Possible
grstatus grstatus
Error Codes Warning Codes
arc functions $GRNOTINPROPERMODE, $GRNOOUTPUT,
$GRINVALIDPARAMETER, $GRCLIPPED
clearscreen $GRNOTINPROPERMODE,
$GRINVALIDPARAMETER
ellipse functions $GRNOTINPROPERMODE, $GRNOOUTPUT,
$GRINVALIDPARAMETER, $GRCLIPPED
$GRINSUFFICIENTMEMORY
getarcinfo $GRERROR,
$GRNOTINPROPERMODE
getcurrentposition $GRNOTINPROPERMODE
functions
getfontinfo $GRERROR
getgtextextent $GRERROR
getimage $GRERROR, $GRPARAMETERALTERED
$GRNOTINPROPERMODE,
getphyscoord $GRNOTINPROPERMODE
getpixel $GRERROR,
$GRNOTINPROPERMODE
gettextcursor $GRNOTINPROPERMODE
getviewcoord $GRNOTINPROPERMODE
functions
getwindowcoord $GRNOTINPROPERMODE
getwritemode $GRNOTINPROPERMODE
imagesize $GRNOTINPROPERMODE
lineto $GRNOTINPROPERMODE $GRNOOUTPUT,
$GRCLIPPED
moveto $GRNOTINPROPERMODE
outgtext $GRNOTINPROPERMODE $GRCLIPPED,
$GRNOOUTPUT
pie functions $GRNOTINPROPERMODE, $GRNOOUTPUT,
$GRINVALIDPARAMETER, $GRCLIPPED
$GRINSUFFICIENTMEMORY
polygon functions $GRNOTINPROPERMODE $GRNOOUTPUT,
$GRINVALIDPARAMETER $GRCLIPPED
$GRINSUFFICIENTMEMORY
putimage $GRERROR, $GRPARAMETERALTERED,
$GRNOTINPROPERMODE, $GRNOOUTPUT
$GRINVALIDPARAMETER,
$GRINVALIDIMAGEBUFFER
rectangle functions $GRNOTINPROPERMODE, $GRNOOUTPUT,
$GRINVALIDPARAMETER, $GRCLIPPED
$GRINSUFFICIENTMEMORY
registerfonts $GRCORRUPTEDFONTFILE,
$GRFONTFILENOTFOUND,
$GRINSUFFICIENTMEMORY
$GRINVALIDFONTFILE
scrolltextwindow $GRNOOUTPUT
selectpalette $GRNOTINPROPERMODE,
$GRINVALIDPARAMETER
setactivepage $GRINVALIDPARAMETER
setbkcolor $GRNOTINPROPERMODE $GRPARAMETERALTERED
setcliprgn $GRNOTINPROPERMODE $GRPARAMETERALTERED
setcolor $GRNOTINPROPERMODE $GRPARAMETERALTERED
setfont $GRERROR, $GRPARAMETERALTERED
$GRFONTFILENOTFOUND,
$GRINSUFFICIENTMEMORY
setgtextvector $GRPARAMETERALTERED
settextcolor $GRPARAMETERALTERED
settextcursor $GRNOTINPROPERMODE
settextposition $GRPARAMETERALTERED
settextrows $GRINVALIDPARAMETER $GRPARAMETERALTERED
settextwindow $GRPARAMETERALTERED
setvideomode $GRERROR,
$GRMODENOTSUPPORTED,
$GRINVALIDPARAMETER
setvideomoderows $GRERROR,
$GRMODENOTSUPPORTED,
$GRINVALIDPARAMETER
setvieworg $GRNOTINPROPERMODE
setviewport $GRNOTINPROPERMODE $GRPARAMETERALTERED
setvisualpage $GRINVALIDPARAMETER
setwindow $GRNOTINPROPERMODE, $GRPARAMETERALTERED
$GRINVALIDPARAMETER
setwritemode $GRNOTINPROPERMODE,
$GRINVALIDPARAMETER
-♦-