Solved

SetAbortProc vs. AbortDoc

Posted on 2002-05-13
3
335 Views
Last Modified: 2010-05-18
I know the syntax of both of these functions but can't find any place in the MS literature where it states when one should be used over the other.

From what I've been able to discern with tests it appears as though I should I use SetAbortProc to handler print spooling errors and AbortDoc to handle user cancellation. Anyone know for sure?
0
Comment
Question by:tma050898
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 100 total points
ID: 7006296
Hi tma,

you should use AbortDoc if you want to programmatically cancel the print job
for any reason, i.e. if you provide the user with a print-progress dialog where
the user can press 'Cancel'. Calling AbortDoc in this case ensures that i.e.
not half of the document is printed when the user presses 'Cancel'.

The SetAbortProc should be used to handle the case printing was cancelled
by the OS, i.e. due to lack of memory, missing paper, broken connection
to the printer a.s.o. With this you can i.e. define a function which asks the
user to 'Retry' or to 'Cancel' the print job.

So, your statement '... I should I use SetAbortProc to handler print spooling errors
and AbortDoc to handle user cancellation' is absoluteley correct.

hope that helps,

ZOPPO
0
 
LVL 3

Author Comment

by:tma050898
ID: 7012690
Thanks for the confirmation!
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 7013184
You're welcome,

have a nice day,

regards,

ZOPPO
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question