Share via


Callback Function for CDC::SetAbortProc

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Visual Studio 2017 Documentation. The name AbortFunc is a placeholder for the application-supplied function name.

Syntax

BOOL CALLBACK EXPORT AbortFunc(
    HDC hPr,  
    int code);

Parameters

hPr
Identifies the device context.

code
Specifies whether an error has occurred. It is 0 if no error has occurred. It is SP_OUTOFDISK if the Print Manager is currently out of disk space and more disk space will become available if the application waits. If code is SP_OUTOFDISK, the application does not have to abort the print job. If it does not, it must yield to the Print Manager by calling the PeekMessage or GetMessage Windows function.

Return Value

The return value of the abort-handler function is nonzero if the print job is to continue, and 0 if it is canceled.

Remarks

The actual name must be exported as described in the Remarks section of CDC::SetAbortProc.

Requirements

Header: afxwin.h

See Also

Structures, Styles, Callbacks, and Message Maps
CDC::SetAbortProc