Jump to content

VioSetCp: Difference between revisions

From EDM2
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; ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
Sets the code page used to display text data on the screen for the specified handle.
Sets the code page used to display text data on the screen for the specified handle.
==Syntax==
==Syntax==
<PRE>
  VioSetCp(Reserved, CodePageID, VioHandle)
#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);


</PRE>
==Parameters==
==Parameters==
; Reserved (ULONG) - input : Reserved. Must be 0.  
;Reserved (ULONG) - input : Reserved. Must be 0.
 
;CodePageID (USHORT) - input : Code-page ID.
; CodePageID (USHORT) - input : Code-page ID.
:The CodePageID must be a known code page.
The CodePageID must be a known code page.  
 
; VioHandle (HVIO) - input : VIO presentation-space handle.
; 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.  
: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==
==Return Code==
 
;rc (APIRET):VioSetCp returns one of the following values:
rc (APIRET) - returns
* 0 NO_ERROR
 
* 355 ERROR_VIO_MODE
VioSetCp returns one of the following values:
* 421 ERROR_VIO_INVALID_PARMS
 
* 436 ERROR_VIO_INVALID_HANDLE
* 0         NO_ERROR  
* 469 ERROR_VIO_BAD_CP
* 355       ERROR_VIO_MODE  
* 421       ERROR_VIO_INVALID_PARMS  
* 436       ERROR_VIO_INVALID_HANDLE  
* 469       ERROR_VIO_BAD_CP


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


==Example Code==
[[Category:Vio]]
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 
 
[[Category:The OS/2 API Project]]

Latest revision as of 23:24, 3 April 2018

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

Syntax

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)
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.