NEWFRAME

Syntax

short Escape(hDC, NEWFRAME,NULL, NULL, NULL)

This escape informs the device that the application has finished writing to a page. This escape is typically used with a printer to direct the device driver to advance to a new page.

Parameter Type/Description  

hDC HDC Identifies the device context.  

Return Value

The return value specifies the outcome of the escape. It is positive if the escape is successful. Otherwise, it is one of the following values:

Value Meaning

SP_APPABORT Job was terminated because the application's abort function returned zero.
SP_ERROR General error.
SP_OUTOFDISK Not enough disk space is currently available for spooling, and no more space will become available.
SP_OUTOFMEMORY Not enough memory is available for spooling.
SP_USERABORT User terminated the job through the Print Manager.

Comments

Do not use the NEXTBAND escape with NEWFRAME. For banding drivers, GDI replays a metafile to the printer, simulating a sequence of NEXTBAND escapes.

The NEWFRAME escape restores the default values of the device context. Con-sequently, if a font other than the default font is selected when the application calls the NEWFRAME escape, the application must select the font again following the NEWFRAME escape.