Jump to content

VioSetCp

From EDM2
Revision as of 18:07, 10 June 2016 by Martini (talk | contribs) (Created page with "==Description== Sets the code page used to display text data on the screen for the specified handle. ==Syntax== <PRE> #define INCL_VIO #include <os2.h> ULONG Reserved; ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Sets the code page used to display text data on the screen for the specified handle.

Syntax

#define INCL_VIO
#include <os2.h>

ULONG     Reserved;    /*  Reserved.  Must be 0. */
USHORT    CodePageID;  /*  Code-page ID. */
HVIO      VioHandle;   /*  VIO presentation-space handle. */
APIRET    rc;          /*  Return code. */

rc = VioSetCp(Reserved, CodePageID, VioHandle);

Parameters

Reserved (ULONG) - input
Reserved. Must be 0.
CodePageID (USHORT) - input
Code-page ID.

The CodePageID must be a known code page.

VioHandle (HVIO) - input
VIO presentation-space handle.

This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.

Return Code

rc (APIRET) - returns

VioSetCp returns one of the following values:

  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 421 ERROR_VIO_INVALID_PARMS
  • 436 ERROR_VIO_INVALID_HANDLE
  • 469 ERROR_VIO_BAD_CP

Remarks

The specified code page applies to all new characters. How VioSetCp acts on characters already in the video buffer is undefined.

Example Code


Related Functions

  • [[OS2 API:CPI: