Jump to content

VioSetMode: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m Ak120 moved page OS2 API:CPI:VioSetMode to VioSetMode
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
Sets the mode of the display.
Sets the mode of the display.  


==Syntax==
==Syntax==
<PRE>
VioSetMode (ModeData, VioHandle)
#define INCL_VIO
#include <os2.h>


PVIOMODEINFO    ModeData;  /*  Mode characteristics. */
HVIO            VioHandle;  /*  VIO presentation-space handle. */
APIRET          rc;        /*  Return code. */
rc = VioSetMode(ModeData, VioHandle);
</PRE>
==Parameters==
==Parameters==
; ModeData (PVIOMODEINFO) - input : Mode characteristics.
;ModeData (P[[VIOMODEINFO]]) - input: Mode characteristics.
Address of the mode characteristics structure.  
:Address of the mode characteristics structure.
;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]].


; 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==
==Return Code==
 
;rc (APIRET) - returns:VioSetMode returns one of the following values:
rc (APIRET) - returns
*0 NO_ERROR
 
*355 ERROR_VIO_MODE
VioSetMode returns one of the following values:
*421 ERROR_VIO_INVALID_PARMS
 
*430 ERROR_VIO_ILLEGAL_DURING_POPUP
* 0     NO_ERROR  
*436 ERROR_VIO_INVALID_HANDLE
* 355   ERROR_VIO_MODE  
*438 ERROR_VIO_INVALID_LENGTH
* 421   ERROR_VIO_INVALID_PARMS  
*467 ERROR_VIO_FONT
* 430   ERROR_VIO_ILLEGAL_DURING_POPUP  
* 436   ERROR_VIO_INVALID_HANDLE  
* 438   ERROR_VIO_INVALID_LENGTH  
* 467   ERROR_VIO_FONT


==Remarks==
==Remarks==
Line 39: Line 25:
VioSetMode does not clear the screen if the new and old modes are compatible. To clear the screen, use one of the VioScrollxx calls.
VioSetMode does not clear the screen if the new and old modes are compatible. To clear the screen, use one of the VioScrollxx calls.


Assuming that no target display configuration for VioSetMode is selected, the mode is set on the primary configuration. If the primary configuration does not support the specified mode, the mode is set on the secondary configuration.  
Assuming that no target display configuration for VioSetMode is selected, the mode is set on the primary configuration. If the primary configuration does not support the specified mode, the mode is set on the secondary configuration.
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 


[[Category:The OS/2 API Project]]
[[Category:Vio]]

Latest revision as of 18:54, 1 January 2020

Sets the mode of the display.

Syntax

VioSetMode (ModeData, VioHandle)

Parameters

ModeData (PVIOMODEINFO) - input
Mode characteristics.
Address of the mode characteristics structure.
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
VioSetMode returns one of the following values:
  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 421 ERROR_VIO_INVALID_PARMS
  • 430 ERROR_VIO_ILLEGAL_DURING_POPUP
  • 436 ERROR_VIO_INVALID_HANDLE
  • 438 ERROR_VIO_INVALID_LENGTH
  • 467 ERROR_VIO_FONT

Remarks

VioSetMode initializes the cursor position and type.

VioSetMode does not clear the screen if the new and old modes are compatible. To clear the screen, use one of the VioScrollxx calls.

Assuming that no target display configuration for VioSetMode is selected, the mode is set on the primary configuration. If the primary configuration does not support the specified mode, the mode is set on the secondary configuration.