Solved

Printing Multiple Copies

Posted on 1998-07-30
6
355 Views
Last Modified: 2013-12-03
How do I determine if a printer is capable of printing multiple pages. I tried using the DeviceCapabilities function, with the DC_COPIES parameter. This came back with a large number. I assumed that this meant it could print multiple copies. I then put the desired number of copies in the dmCopies parameter of the DEVMODE structure and then created a device context with the DEVMODE as the third parameter. It did not work. The printer was a Xerox laser, so I assume it should be able to,
0
Comment
Question by:philsmicronet
6 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1411653
how did you create the device?  with CreateDC()?  This might be more for use by OpenPrinter().  I'm just guessing though.
0
 

Expert Comment

by:aborman
ID: 1411654
How are you sending the info to the printer?
0
 
LVL 1

Author Comment

by:philsmicronet
ID: 1411655
I used CreateDC to create the device context. We are using normal Device context commands.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1411656
DeviceCapabilities is the correct function but you're using it wrong.

1st & 2nd parameters - you pass the strings for currently chosen printer.

3rd parameter : The capability you're interested is is DC_COPIES.
But pass NULL for the DEVMODE parameter.

4th parameter is NULL.

5th parameter is NULL

Look at the return value from DeviceCapabilites.  -1 means an error occurred (e.g. the setup or driver is messed up, or you passed the wrong strings) other values give you the max number of copies you can print.
0
 
LVL 1

Author Comment

by:philsmicronet
ID: 1411657
I'm still having problems with this. I have done as suggested and the Device Capabilities function does seem to work as required. If the printer supports multiple copies then it returns a large number. If the printer does not it seems to return 0. I then set the dmCopies field of the devmode structure and create the Device Context. However this does not seem to cause it to print multiple copues. Any ideas.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1411658
I hope you haven't been working on this solidly since August!  : - )  

Post your code so we can see it.
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.Net Loading Word 11 103
What the difference between blend and Visual Studio 3 106
Trouble with References... 5 56
Question to Pivot table 1 54
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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