Article View: borland.public.cppbuilder.nativeapi
Article #12611Re: Windows Printers
From: John Scott
Date: Sun, 30 Nov 2003 17:09
Date: Sun, 30 Nov 2003 17:09
19 lines
1555 bytes
1555 bytes
I tried the following but get an error. Could you point out the error?
char *ADevice, *ADriver, *APort;
int ADeviceMode;
DEVMODE DMode;
//ADeviceMode=DMode;
Printer()->GetPrinter(ADevice, ADriver, APort, DMode);
Printer()->SetPrinter(ADevice, ADriver, APort, DMode);
thanks - John
>
> This is a known issue with the TPrinter Object. What you need
> to do is to set the Printer()->PrinterIndex and then use
> Printer->GetPrinter followed by Printer()->SetPrinter to
> ensure that the Printer()->Handle is valid.
>
> ~ JD
>
Technical Details
Message-ID:
<3fca2474@newsgroups.borland.com>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-mailReferences:
<3fbcf9c2@newsgroups.borland.com> <3fbd8132$1@newsgroups.borland.com> <3fc77301@newsgroups.borland.com> <3fc7e524$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7b2449597708bec X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-30 09:39:03 PST From: "John Scott" <jscott@kw.igs.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fbcf9c2@newsgroups.borland.com> <3fbd8132$1@newsgroups.borland.com> <3fc77301@newsgroups.borland.com> <3fc7e524$1@newsgroups.borland.com> Subject: Re: Windows Printers Date: Sun, 30 Nov 2003 12:09:13 -0500 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 216.16.227.123 Message-ID: <3fca2474@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070212212 216.16.227.123 (30 Nov 2003 09:10:12 -0700) 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