You must export the AbortDlg dialog box procedure and the AbortProc function. Add the following lines to your module-definition file under the EXPORTS statement:
AbortDlg @5 ; Called so user can cancel the print function
AbortProc @6 ; Processes messages intended for Abort dialog box