🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #25

Re: printing to a file

#25
From: Tom W. Brown
Date: Wed, 28 Oct 1992 00:15
21 lines
1628 bytes
In article <1992Oct26.231553.26262@emr1.emr.ca>, jagrant@emr1.emr.ca (John Grant) writes:
|> I can't seem to print to a file, even though I specify the filename in the
|> printer dialog, i.e. PrintDlg().

A guess only -- I'll bet that if you use the PD_RETURNDC flag that,
internally, the PrintDlg routine picks up the option to print to file along
with the file name and uses it in the CreateDC.  Since you're not using
this it isn't happening (I know we went through this before, perhaps you
can restructure the DeleteDC logic so that you can use PD_RETURNDC).

You could examine this flag in the PRINTDATA structure after the call to
PrintDlg, but damned if I can see a way to get at the filename!  Perhaps
it is in the DEVNAMES block, immediately after the physical output name and
you just have to point to there via wOutputOffset plus the string length.


----------------------------------------------------------------------------
Tom Brown               |  "Strange women, lying in ponds, distributing
PE Nelson Systems       |   swords is no basis for a system of government."
twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
----------------------------------------------------------------------------
Technical Details
Message-ID: <669@lax.lax.pe-nelson.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown
References: <1992Oct26.231553.26262@emr1.emr.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: printing to a file
Message-ID: <669@lax.lax.pe-nelson.com>
Date: 28 Oct 92 00:15:27 GMT
References: <1992Oct26.231553.26262@emr1.emr.ca>
Sender: news@lax.pe-nelson.com
Organization: PE-Nelson
Lines: 21