subcalls.hlp (Topic list)
VioScrollDn (1.2)
Overview  Changes                                 Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioScrollDn(usTopRow, usLeftCol, usBotRow, usRightCol, cbLines,
    pbCell, hvio)
USHORT usTopRow;      /* top row                  */
USHORT usLeftCol;     /* left column              */
USHORT usBotRow;      /* bottom row               */
USHORT usRightCol;    /* right column             */
USHORT cbLines;       /* number of blank lines    */
PBYTE pbCell;         /* pointer to cell to write */
HVIO hvio;            /* video handle             */
 
The VioScrollDn function scrolls the current screen downward.
 
The VioScrollDn function is a family API function.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
usTopRow    Specifies the top row of the screen area to scroll.
 
usLeftCol   Specifies the leftmost column of the screen area to scroll.
 
usBotRow    Specifies the bottom row of the screen area to scroll.
 
usRightCol  Specifies the rightmost column of the screen area to scroll.
 
cbLines     Specifies the number of lines to be inserted at the top of the
            screen area being scrolled. If this parameter is zero, no lines
            are scrolled.
 
pbCell      Points to a character/attribute combination, called a cell, that
            fills the screen area left blank by the scrolling.
 
hvio        Identifies an advanced video-input-and-output (AVIO)
            presentation space. For AVIO programs, this handle must have
            been created previously using the VioCreatePS function. For
            other programs, hvio must be NULL.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_VIO_COL
     ERROR_VIO_INVALID_HANDLE
     ERROR_VIO_ROW
 
Comments
 
If the usTopRow and usLeftCol parameters are zero, they identify the
upper-left corner of the screen. If you specify a value greater than the
maximum for usTopRow, usLeftCol, usBotRow, usRightCol, or cbLines, the
maximum value for that parameter is used. Maximum values depend upon the
dimensions of the screen being used.
 
You can use the VioScrollDn function to clear the screen by setting
usTopRow and usLeftCol to zero and usBotRow, usRightCol, and cbLines to
their maximum values. The function clears the screen by using the
character/attribute combination pointed to by the pbCell parameter.
 
Example
 
This example creates a cell containing the space character (0x20) and a
white character attribute (0x07 on an EGA color monitor), and calls
VioScrollDn to clear the screen by using this cell. By changing the
character attribute, you could change the background color of the screen
while clearing it at the same time (using the value 0xFFFF for usBotRow,
usRightCol, and cbLines clears the screen).
 
BYTE bCell[2];
bCell[0] = 0x20;      /* space character       */
bCell[1] = 0x07;      /* white attribute (EGA) */
VioScrollDn(0,        /* top row               */
    0,                /* left column           */
    0xFFFF,           /* bottom row            */
    0xFFFF,           /* right column          */
    0xFFFF,           /* number of lines       */
    bCell,            /* cell to write         */
    0);               /* video handle          */
 
See Also
 
VioCreatePS, VioScrollLf, VioScrollRt, VioScrollUp