DEVESC_NEWFRAME
GreEscape DEVESC_NEWFRAME indicates that there is no more data for the current page.
- Simulation support
This function is mandatory for hardcopy drivers and must be implemented in order to have a valid OS/2 hardcopy driver. For other drivers, it is simulated by a handling routine in the graphics engine.
Syntax
GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction);
Parameters
- hdc (HDC) - input
- Device context handle.
- lEscape (LONG) - input
- DEVESC_NEWFRAME escape code.
- cInCount (LONG) - input
- The handling routine ignores this parameter.
- pInData (PBYTE) - input
- The handling routine ignores this parameter.
- pcOutCount (PLONG) - input
- The handling routine ignores this parameter.
- pOutData (PLONG) - input
- The handling routine ignores this parameter.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreEscape.
Returns
- rc (LONG) - returns
- Return Code.
- The handling routine returns:
- DEV_OK
-
- Successful
- DEVESC_NOTIMPLEMENTED
-
- Escape not implemented for specified code
- DEVESC_ERROR
-
- Error
Remarks
For a display device, DEVESC_NEWFRAME is similar to GreErasePS. However, the handling routine should reset the attributes (color and mix). For hardcopy devices, the handling routine would advance the paper to a new page.
Note: For an OD_QUEUED device with PM_Q_STD data, the spooler records this escape in the buffer, but does not pass it on to the presentation driver.
The following sequence implies that the previous page is completed and ejected, and then a blank page is ejected, even if no other functions are called between the two GreEscapes.
GreEscape(DEVESC_NEWFRAME) GreEscape(DEVESC_NEWFRAME)
This escape code is metafiled and recorded.
Sample Source Code
Declaration:
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ LONG lEscape; /* DEVESC_NEWFRAME escape code. */ LONG cInCount; /* The handling routine ignores this parameter. */ PBYTE pInData; /* The handling routine ignores this parameter. */ PLONG pcOutCount; /* The handling routine ignores this parameter. */ PLONG pOutData; /* The handling routine ignores this parameter. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreEscape. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction);