Article View: borland.public.cppbuilder.nativeapi
Article #7916Re: Printer properties
From: Bob Gonder
Date: Wed, 15 Dec 2004 16:33
Date: Wed, 15 Dec 2004 16:33
23 lines
1752 bytes
1752 bytes
Thomas J. wrote: >How can I get the ACTUAL printer properties. >For example: >I start my application read the properties like width and height of a page >and the values are fine. >If I now change the printer setting via printer setup of windows like width >and height and read again the properties of the printer I get still the old >properties. 1) Do you leave the printer open or do you ClosePrinter() ? Do you check the return value from DocumentProperties() for errors? 2) Don't do that (use external windows printer setup). Instead, do it from your program with PrintDlg() with the PD_PRINTSETUP flag. PrintDlg() returns the settings in the DEVMODE. It might be if you ask Windows for a new DEVMODE that it will go back to the original values, so keep and use the one returned from PrintDlg
Technical Details
Message-ID:
<6ro0s0pgsjn6kr7lnhkb68gtfkr2g0glm2@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41bfe84c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6620db7697e43cb9 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Printer properties Date: Wed, 15 Dec 2004 08:33:55 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <6ro0s0pgsjn6kr7lnhkb68gtfkr2g0glm2@4ax.com> References: <41bfe84c$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.147.211 X-Trace: newsgroups.borland.com 1103128433 67.77.147.211 (15 Dec 2004 08:33:53 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail