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.
About Video Input and Output (1.2)
◄Using Section► ◄Function Group► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
About Video Input and Output
This topic describes the video-input-and-output (video I/O) functions. These
functions give programs direct access to the system display.
A program can write individual characters and strings to the screen, either
at the current cursor position by using the VioWrtTTY function or at a
specified position by using the VioWrtNChar or VioWrtCharStr function.
Strings can consist of characters, attributes, or character-and-attribute
pairs.
A character is actually specified by a character value. The screen uses the
value to locate a character bitmap in the current screen font and then
displays the bitmap at the specified location. For some displays, a program
can change the current screen font by using the VioSetFont function. To do
this, the program typically first retrieves the screen font by using the
VioGetFont function and then modifies that font before setting it as the new
font. The format of the font bitmap depends on the display.
A program can write character attributes to the screen by using the
VioWrtNAttr or VioWrtCharStrAtt function. Attributes define the color and
appearance of the characters at the corresponding position. The effect of a
given attribute depends on the display.
A program can also combine character and attribute values into a single
value, called a cell or a character-and-attribute pair, and write one or
more cells to the screen at the specified position by using the VioWrtNCell
or VioWrtCellStr function.
A program can set the position of the cursor by using the VioSetCurPos
function or retrieve the current position of the cursor by using the
VioGetCurPos function. The cursor position, like any position on the screen,
is specified in screen coordinates. Screen coordinates are relative to the
upper-left corner of the screen. The x-axis values increase to the right;
the y-axis values increase downward. The screen units are either character
cells or pixels, depending on the screen mode (character cells for text
mode, pixels for graphics mode). The position never exceeds the width or
height of the screen. A program can also set the cursor type, which defines
the width and height of the cursor as well as its color and appearance, by
using the VioSetCurType function.
A program can also set or retrieve the screen mode by using the VioSetMode
or VioGetMode function, respectively. Which modes can be set depends
entirely on the display.
A program can scroll the screen contents left, right, up, or down by using
the VioScrollLf, VioScrollRt, VioScrollUp, and VioScrollDn functions. The
scroll functions move the specified rectangle to the given location on the
screen, filling any area uncovered by the rectangle with the given character
and attribute.
Other screen functions carry out such special tasks as adapting the screen
for country-specific or ANSI information, modifying the operation of one or
more of the screen functions, and accessing the video buffers directly.
♦