Article View: borland.public.cppbuilder.nativeapi
Article #15111Re: TPrinter Problem
From: Anthony
Date: Wed, 16 Jul 2003 01:17
Date: Wed, 16 Jul 2003 01:17
48 lines
2302 bytes
2302 bytes
Gambit, The following code seems to work: char cDevice[256]; char cDriver[256]; char cPort[256]; THandle hDeviceMode; HANDLE HPrinter; Printer()->PrinterIndex = index; Printer()->GetPrinter(cDevice, cDriver, cPort, hDeviceMode ); HDC HPrinterDC = CreateDC(NULL, cDevice, NULL, NULL); width = GetDeviceCaps(HPrinterDC, PHYSICALWIDTH); // page size x in pixels What do you think of this? Is it going to be stable? Anthony "Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message news:3f147649$1@newsgroups.borland.com... > > "Anthony" <awhitesell@attbi.com> wrote in message > news:3f1471c0$1@newsgroups.borland.com... > > > I can use both > > > > HDC HPrinterDC = CreateDC(NULL, Device.c_str(), NULL, pdm); > > and > > HDC HPrinterDC = CreateIC(NULL, Device.c_str(), NULL, pdm); > > I didn't say to use CreateDC(). That is a different matter. > > > and get the correct page sizes. > > What does page sizes have to do with anything? You said you were receiving > the same HDC when using Printer()->Handle? Or did I misread what you said > originally? Please clearify EXACTLY what you are trying to do and what > EXACTLY is not working correctly. > > > Gambit > >
Technical Details
Message-ID:
<3f14a954$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f1460f3$1@newsgroups.borland.com> <3f14693d$1@newsgroups.borland.com> <3f1471c0$1@newsgroups.borland.com> <3f147649$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d59131589fe63384 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-15 18:39:52 PST From: "Anthony" <awhitesell@attbi.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f1460f3$1@newsgroups.borland.com> <3f14693d$1@newsgroups.borland.com> <3f1471c0$1@newsgroups.borland.com> <3f147649$1@newsgroups.borland.com> Subject: Re: TPrinter Problem Date: Tue, 15 Jul 2003 21:17:51 -0400 Lines: 50 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: 24.128.134.183 Message-ID: <3f14a954$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058318676 24.128.134.183 (15 Jul 2003 18:24:36 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail