🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

From DEVMODE to paper size

#11440
From: Martin Golm
Date: Wed, 11 Feb 2004 16:19
13 lines
1299 bytes
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.
I already tried GetDeviceCaps(dc, PHYSICALWIDTH), but that doesn't seem
to reflect the paper I just set.

Can anybody help here?

Thanks in advance,
Martin
Technical Details
Message-ID: <402A55FD.FC92BCD0@gmx.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,88ac6a209519f1c8,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-11 08:40:16 PST
Message-ID: <402A55FD.FC92BCD0@gmx.de>
Date: Wed, 11 Feb 2004 17:19:09 +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: From DEVMODE to paper size
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.153.11.148
X-Trace: newsgroups.borland.com 1076516290 62.153.11.148 (11 Feb 2004 08:18:10 -0800)
Lines: 14
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail