🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11286

Re: From DEVMODE to paper size

#11286
From: Martin Golm
Date: Mon, 16 Feb 2004 09:42
28 lines
1807 bytes
Alan Bellingham wrote:
> 
> Martin Golm <golm@gmx.de> wrote:
> 
> >How can I calculate the paper size from a DEVMODE struct that
> >PageSetupDlg() returns?
> >The problem is, DEVMODE.dmPaperSize is set to 1 (or 9) and
> >DEVMODE.dmFormName is set to "Letter" (or "A4"), but neither
> >DEVMODE.dmPaperLength and DEVMODE.dmPaperWidth are set. And I don't know
> >from where to get these values.
> 
> Keep a table.
> MSDN tells you the relevant dimensions - so if you get something like
> DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED, then look up in your table and
> get the size 148- by 200-millimeters.
> The following is from the 2003 MSDN, in case you can't find it
> elsewhere:
[snip] 
> Alan Bellingham

Alan,

though yours is probably a good solution, we decided to use PrintDlg
instead of PageSetupDlg and retrieve the size from the returned printer
DC.

Thanks,
Martin
Technical Details
Message-ID: <40309084.31783BD6@gmx.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <402A55FD.FC92BCD0@gmx.de> <d0ok201ac0058vu6cbb6egjbbkrcgfim4c@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,88ac6a209519f1c8
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-17 00:09:30 PST
Message-ID: <40309084.31783BD6@gmx.de>
Date: Mon, 16 Feb 2004 10:42:28 +0100
From: Martin Golm <golm@gmx.de>
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: From DEVMODE to paper size
References: <402A55FD.FC92BCD0@gmx.de> <d0ok201ac0058vu6cbb6egjbbkrcgfim4c@4ax.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.153.9.1
X-Trace: newsgroups.borland.com 1077003633 62.153.9.1 (16 Feb 2004 23:40:33 -0800)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail