EndPage

3.1

  int EndPage(hdc)    
  HDC hdc; /* handle of device context */

The EndPage function signals the device that the application has finished writing to a page. This function is typically used to direct the driver to advance to a new page.

This function replaces the NEWFRAME printer escape for Windows 3.1. Unlike NEWFRAME, this function is always called after printing a page.

Parameters

hdc

Identifies the device context for the print job.

Return Value

The return value is greater than or equal to zero if the function is successful. Otherwise, it is an error value.

Errors

If the function fails, it returns one of the following error values:

Value Meaning

SP_ERROR General error.
SP_APPABORT Job was terminated because the application's print-canceling function returned zero.
SP_USERABORT User terminated the job by using Windows Print Manager (PRINTMAN.EXE).
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.

Comments

The ResetDC function can be used to change the device mode, if necessary, after calling the EndPage function.

See Also

Escape, ResetDC, StartPage