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.
VioSetState (1.2)
◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_VIO
USHORT VioSetState(pvoidState, hvio)
PVOID pvoidState; /* pointer to buffer with new state */
HVIO hvio; /* video handle */
The VioSetState function sets the palette-register values, the overscan
(border) color, the blink/background intensity, the screen color, the
underline position, or the display adapter.
The VioSetState function is a family API function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pvoidState Points to the structure that contains the request type and the
values to set. The structure type, which depends on the request
type specified in the type field of each structure, is one of
the following: VIOPALSTATE, VIOOVERSCAN, VIOINTENSITY,
VIOCOLORREG, VIOSETULINELOC, or VIOSETTARGET.
hvio Identifies an advanced video-input-and-output (AVIO)
presentation space. For AVIO programs, this handle must have
been created by 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_INVALID_HANDLE
ERROR_VIO_INVALID_LENGTH
Example
This example retrieves the current settings of the palette registers,
switches palette registers #0 and #7, and calls VioSetState to enable the
new settings.
BYTE abState[38];
PVIOPALSTATE pviopal;
USHORT usTmp;
pviopal = (PVIOPALSTATE) abState;
pviopal->cb = sizeof(abState);
pviopal->type = 0; /* retrieves palette registers */
pviopal->iFirst = 0; /* first register to retrieve */
VioGetState(pviopal, 0); /* retrieves current settings */
usTmp = pviopal->acolor[0]; /* swaps #0 and #7 */
pviopal->acolor[0] = pviopal->acolor[7];
pviopal->acolor[7] = usTmp;
VioSetState(pviopal, 0); /* enables new settings */
See Also
VioCreatePS, VioGetState, VioSetMode, VIOCOLORREG, VIOINTENSITY,
VIOOVERSCAN, VIOPALSTATE, VIOSETTARGET, VIOSETULINELOC
♦