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.
VioWrtCharStrAtt (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioWrtCharStrAtt(pchString, cbString, usRow, usColumn, pbAttr,
    hvio)
PCH pchString;      /* pointer to string to write */
USHORT cbString;    /* length of string           */
USHORT usRow;       /* starting position (row)    */
USHORT usColumn;    /* starting position (column) */
PBYTE pbAttr;       /* pointer to attribute       */
HVIO hvio;          /* video handle               */
 
The VioWrtCharStrAtt function writes a character string to the screen, using
the specified attribute. If the string is longer than the current line, the
function continues writing it at the beginning of the next line but does not
write past the end of the screen.
 
The VioWrtCharStrAtt 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.
 
usRow      Specifies the row at which to start writing the string.
 
usColumn   Specifies the column at which to start writing the string.
 
pbAttr     Points to the variable that specifies the attribute to be used
           for each character in the 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 one of the following:
 
     ERROR_VIO_COL
     ERROR_VIO_INVALID_HANDLE
     ERROR_VIO_ROW
 
Example
 
This example calls VioWrtCharStrAtt to display the string "Hello World!" in
the center of the screen in green characters on a white background (on an
EGA color monitor):
 
BYTE bhAttr = 0x72;        /* green character, white background */
VioWrtCharStrAtt("Hello World!",        /* string to display    */
     12,                                /* length of string     */
     12,                                /* row                  */
     35,                                /* column               */
     &bhAttr,                           /* address of attribute */
     0);                                /* video handle         */
 
See Also
 
VioCreatePS, VioWrtCharStr, VioWrtNAttr, VioWrtTTY