In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Window or Not?

In Volume 1, Issue 9 a technique was documented which permitted the developer to ascertain whether a window was on the screen to avoid fatal references to WINDOW_COMMON%. This made use of a VIDEO.RW call to see if the status line had the literal "Window" at the beginning, but unfortunately had several limitations. If the status line is turned off, this literal will not be present. If the new enhanced EGA/VGA modes are used, the screen will not be 25 lines deep and the status line will appear at a different location.

Regardless of whether the status line is enabled, calls to STATUP continue. If the Status line is disabled, they merely do not display. This means that all of the current @Variables relating to the status line remain valid even with the status line turned off. The variable @STATREC (as documented in @ATTACK) contains the contents of the current status line. Therefore a simpler function to check for the presence of a window would be (with acknowledgments to Mike Pope of RevTech for pointing this out).


0001       FUNCTION IN_WINDOW
0002       RETURN (@STATREC<0,1>="Window")

(Volume 2, Issue 9, Page 4)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel