Jump to content

VioAssociate: Difference between revisions

From EDM2
Created page with "==Description== Associates or disassociates a VIO presentation space with a device context. ==Syntax== <PRE> #define INCL_VIO #include <os2.h> HDC hdc; /* Device-co..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
Associates or disassociates a VIO presentation space with a device context.
Associates or disassociates a VIO presentation space with a device context.


==Syntax==
==Syntax==
<PRE>
  VioAssociate (hdc, hvps)
#define INCL_VIO
#include <os2.h>
 
HDC      hdc;  /*  Device-context handle. */
HVIO      hvps;  /*  VIO presentation space handle. */
APIRET    rc;    /* Return code. */
 
rc = VioAssociate(hdc, hvps);
</PRE>


==Parameters==
==Parameters==
; hdc (HDC) - input : Device-context handle.
;hdc ([[HDC]]) - input: Device-context handle.
If this is NULL, a disassociation occurs.  
:If this is NULL, a disassociation occurs.
 
;hvps (HVIO) - input: VIO presentation space handle.
; hvps (HVIO) - input : VIO presentation space handle.
:This is returned from [[VioCreatePS]].
This is returned from VioCreatePS.  


==Return Code==
==Return Code==
rc (APIRET) - returns
;rc (APIRET) - returns:VioAssociate returns one of the following values:
 
:0 NO_ERROR
VioAssociate returns one of the following values:
:421 ERROR_VIO_INVALID_PARMS
 
:436 ERROR_VIO_INVALID_HANDLE
* 0         NO_ERROR  
:495 ERROR_VIO_NOT_PRES_MGR_SG
* 421       ERROR_VIO_INVALID_PARMS  
:499 ERROR_VIO_ASSOCIATED_DC
* 436       ERROR_VIO_INVALID_HANDLE  
* 495       ERROR_VIO_NOT_PRES_MGR_SG  
* 499       ERROR_VIO_ASSOCIATED_DC


==Remarks==
==Remarks==
Line 39: Line 25:
An associated presentation space or device context cannot be associated.
An associated presentation space or device context cannot be associated.


The screen device context is the only kind of device that can be associated with a VIO presentation space.  
The screen device context is the only kind of device that can be associated with a VIO presentation space.
==Example Code==
<PRE>
 
</PRE>
 
==Related Functions==


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

Latest revision as of 02:50, 17 February 2020

Associates or disassociates a VIO presentation space with a device context.

Syntax

VioAssociate (hdc, hvps)

Parameters

hdc (HDC) - input
Device-context handle.
If this is NULL, a disassociation occurs.
hvps (HVIO) - input
VIO presentation space handle.
This is returned from VioCreatePS.

Return Code

rc (APIRET) - returns
VioAssociate returns one of the following values:
0 NO_ERROR
421 ERROR_VIO_INVALID_PARMS
436 ERROR_VIO_INVALID_HANDLE
495 ERROR_VIO_NOT_PRES_MGR_SG
499 ERROR_VIO_ASSOCIATED_DC

Remarks

Subsequent VIO calls to this VIO presentation space will direct output to the specified device context.

If a null handle is specified for the device context, the presentation space is disassociated from any device context.

An associated presentation space or device context cannot be associated.

The screen device context is the only kind of device that can be associated with a VIO presentation space.