short Escape(hdc, ABORTDOC, NULL, NULL, NULL)
The ABORTDOC printer escape is maintained for backwards compatibility. Applications written for Windows 3.1 should use the AbortDoc function.
This escape stops the current job and erases everything the application has written to the device since the last ENDDOC escape.
The ABORTDOC escape should be used to stop:
Printing operations that do not specify an Abort function by using the SETABORTPROC escape.
Printing operations that have not yet reached their first call to the NEWFRAME or NEXTBAND escape.
hdc
HDC Identifies the device context.
This escape does not return a value.
If an application encounters a printing error, it should not try to stop the operation by using the Escape function with either the ENDDOC or ABORTDOC escape. Graphics device interface (GDI) automatically terminates the operation before returning the error value.
If the application displays a dialog box to allow the user to cancel the print operation, it must send the ABORTDOC escape before destroying the dialog box.
The application must send the ABORTDOC escape before freeing the procedure-instance address of the Abort function, if any.