ResetDCState
Appearance
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);