Jump to content

ResetDCState: Difference between revisions

From EDM2
Created page with "OS2_PM_DRV_ENABLE: ResetDCState resets the device context to its original initialized state. ==Syntax== ResetDCState(ulSubfunction, pParam1, pParam2); ==Parameters== ;ulSu..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
OS2_PM_DRV_ENABLE: ResetDCState resets the device context to its original initialized state.  
OS2_PM_DRV_ENABLE: ResetDCState resets the device context to its original initialized state.


==Syntax==
==Syntax==
  ResetDCState(ulSubfunction, pParam1, pParam2);
  ResetDCState(ulSubfunction, pParam1, pParam2)


==Parameters==
==Parameters==
;ulSubfunction (ULONG) - input  
;ulSubfunction (ULONG) - input:09h
:09h  
;pParam1 (PULONG) - input:A pointer (pInstance) to the DC instance data.
 
;pParam2 (PLONG) - input:Reserved.
;pParam1 (PULONG) - input  
:A pointer (pInstance) to the DC instance data.  
 
;pParam2 (PLONG) - input  
:Reserved.  


==Return Code==
==Return Code==
;rc (LONG) - returns  
;rc (LONG) - returns:Return codes.  
:Return codes.  
:The handling routine should return a LONG integer. Valid values are:
:*0 Successful
:*-1 Error


:The handling routine should return a LONG integer. Valid values are:
==Remarks==
 
The presentation driver deletes all fonts, patterns, and paths, and resets all attributes to their default values. Note that when resources are not owned by the presentation driver, the driver saves the relevant values so that they are available to reset the device context. A typical example is when the default font is a graphics engine font. In this case, the presentation driver saves the font flags and address passed in the first call to [[GreDeviceSetAttributes]].
:*0 Successful
:*-1 Error


==Remarks==
The visible region and the DC origin are not affected by this function.
The presentation driver deletes all fonts, patterns, and paths, and resets all attributes to their default values. Note that when resources are not owned by the presentation driver, the driver saves the relevant values so that they are available to reset the device context. A typical example is when the default font is a graphics engine font. In this case, the presentation driver saves the font flags and address passed in the first call to GreDeviceSetAttributes.  


The visible region and the DC origin are not affected by this function.
==Sample Code==
==Sample Code==
<PRE>
<PRE>
Line 37: Line 30:


rc = ResetDCState(ulSubfunction, pParam1, pParam2);
rc = ResetDCState(ulSubfunction, pParam1, pParam2);
</PRE>
</PRE>


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 14:05, 3 April 2025

OS2_PM_DRV_ENABLE: ResetDCState resets the device context to its original initialized state.

Syntax

ResetDCState(ulSubfunction, pParam1, pParam2)

Parameters

ulSubfunction (ULONG) - input
09h
pParam1 (PULONG) - input
A pointer (pInstance) to the DC instance data.
pParam2 (PLONG) - input
Reserved.

Return Code

rc (LONG) - returns
Return codes.
The handling routine should return a LONG integer. Valid values are:
  • 0 Successful
  • -1 Error

Remarks

The presentation driver deletes all fonts, patterns, and paths, and resets all attributes to their default values. Note that when resources are not owned by the presentation driver, the driver saves the relevant values so that they are available to reset the device context. A typical example is when the default font is a graphics engine font. In this case, the presentation driver saves the font flags and address passed in the first call to GreDeviceSetAttributes.

The visible region and the DC origin are not affected by this function.

Sample Code

#include <os2.h>

ULONG     ulSubfunction;  /*  09h */
PULONG    pParam1;
PLONG     pParam2;        /*  Reserved. */
LONG      rc;             /*  Return codes. */

rc = ResetDCState(ulSubfunction, pParam1, pParam2);