subcalls.hlp (Topic list)
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.
VioWrtTTY (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioWrtTTY(pchString, cbString, hvio)
PCH pchString;      /* pointer to string to write */
USHORT cbString;    /* length of string           */
HVIO hvio;          /* video handle               */
 
The VioWrtTTY function writes a character string to the screen, starting at
the current cursor position. This function advances the cursor as it writes
each character, using a default attribute for each character. If the
function reaches the end of the line, it continues writing at the beginning
of the next line. If it reaches the end of the last line on the screen, it
scrolls the screen and continues writing at the beginning of a new line.
 
The VioWrtTTY function is a family API function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pchString  Points to the character string to write.
 
cbString   Specifies the length (in bytes) of the character string.
 
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 the following:
 
     ERROR_VIO_INVALID_HANDLE
 
Comments
 
For some ASCII values, VioWrtTTY carries out an action rather than
displaying a character. The following list describes the action taken when
the given ASCII byte value is in the string:
 
Value  Meaning
────────────────────────────────────────────────────────────────────────────
0x08   Backspace. Move the cursor left by one position, without deleting any
       character that is under the cursor. If the cursor is at the beginning
       of the line, take no action.
 
0x09   Tab. Copy spaces from the current cursor position to the next tab
       stop. Tab stops are placed at every eighth character position on a
       line.
 
0x0A   Linefeed. Move the cursor down to the next line. The screen will
       scroll up one line if the current line is at the bottom of the
       screen.
 
0x0D   Return. Move the cursor to the beginning of the line.
 
0x07   Bell. Generate a beep on the computer's speaker.
 
If the process has enabled ANSI processing by using the VioSetAnsi function,
VioWrtTTY processes any ANSI escape sequences in the string.
 
Example
 
The following example calls VioWrtTTY to write a message to the screen and
beep the computer's speaker:
 
VioWrtTTY("File not found\r\n\007", 17, 0);
 
See Also
 
VioCreatePS, VioSetAnsi, VioSetCurPos, VioWrtCellStr, VioWrtCharStr