Solved

Setting custom papersize

Posted on 1998-06-29
4
194 Views
Last Modified: 2010-04-01
I need to print on labels of different sizes, sizes that are not defined as standard by NT, on a 24pin matrix printer, so I need to set the size of the paper to fit, so the printer doesn't feed a mile after the label.

I realize that this is done using the DEVMODE structure together with ResetDC() or CreateDC(), but when I do so, I don't get the paper size changed, in fact nothing goes wrong, it just doesn't change anything, what are the correct steps to take to set the paper size, ie what fields must be filled and can a poorly written driver refuse to set the paper size (the printer is a panasonic kxp-1123, using the M$ std driver)
0
Comment
Question by:dionysos_swamp
  • 2
4 Comments
 
LVL 1

Author Comment

by:dionysos_swamp
ID: 1166771
Edited text of question
0
 
LVL 23

Accepted Solution

by:
chensu earned 220 total points
ID: 1166772
Is it because of this?
DOCERR: DEVMODE dmPaperSize Member Documentation Error
http://support.microsoft.com/support/kb/articles/q108/9/24.asp
0
 
LVL 22

Expert Comment

by:nietod
ID: 1166773
If that is not the problem, post your code where you try to set the size, so we can see it.
0
 
LVL 1

Author Comment

by:dionysos_swamp
ID: 1166774
well, Chensu, that was a most exelent answer, short, exact and usable, if I could I would give you an pow(A,2) but the grade scale here is incapable of handling your enormous wit.
Thank you for your speedy answer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now