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

Uncommon Knowledge - WC_VWindow%

The Vspace image of the current window. Note that this image does not contain the border of the window. Note further that in the case of table mode, the box image will be included (although not that of the heading which is in Vhead q.v.). As a VSpace image may conceivably be wider than the physical screen it cannot normally be manipulated for use by Video.Rw per VPrev but it can be directly updated using Vspace calls.

Thus for example, if it was wished to provide the user with a softkey which showed the current prompt width and then at a keypress returned to the screen, one could use a code fragment such as the sample below which uses VSpace to save off whatever is currently displayed on screen using a VSave call, displays a string of * as long as Vsp_Len then waits for a keypress. At a keypress it restores the image saved by the VSave call using a VRstr call.


0001      Subroutine Display_Length
0002         $Insert Include, Window_Common%
0003         $Insert Include, Virtual.Params
0004         Declare Subroutine VSpace
0005         Win = WC_VWindow% ; X = WC_Vsp_VX%
0006         Y = WC_Vsp_VY% ; Len = WC_Vsp_VLen%
0007  
0008         * Firstly save what is on screen already
0009         VSpace(VSave,OK,Win,X,Y,X+Len,Y,Img)
0010         * Now put up the length mask
0011         VSpace(VPrnt,OK,Win,X,Y,Str("*",Len))
0012         * Wait for a keypress
0013         Call Input.Char(Dummy)
0014         * Now restore the old screen image
0015         VSpace(VRSTR,OK,Win,X,Y,X+Len,Y,Img)
0016      Return

(Volume 3, Issue 10, Page 15)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel