Article View: borland.public.cppbuilder.nativeapi
Article #1658Re: More on Dialogs
From: Bob Gonder
Date: Wed, 27 Jun 2007 15:02
Date: Wed, 27 Jun 2007 15:02
23 lines
1581 bytes
1581 bytes
JD wrote: >TPrinterSetupDialog and TPrintDialog will set the TPrinter's >PrinterIndex. Other dialogs such as PageSetupDlg, PrintDlg and >PrintDlgEx do not (duh ... they're win32 APIs) but they do >So, How does one get the same names that TPrinter uses? I'm guessing this would be easiest... // IPrintDialogServices::GetCurrentPrinterName(pPrinterName, pcchSize) // Returns the printer name for the currently selected printer. http://msdn2.microsoft.com/en-us/library/ms646897.aspx Win2000 required There is a pName in each of these PRINTER_INFO_1 PRINTER_INFO_2 PRINTER_INFO_3 PRINTER_INFO_4 PRINTER_INFO_5 You could maybe use EnumPrinters() and strncmp()
Technical Details
Message-ID:
<i6t483hfej4bf4f1f7tcjfla53jtfj9u70@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46825ff3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,964b3d9a83e56201 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: More on Dialogs Date: Wed, 27 Jun 2007 08:02:23 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <i6t483hfej4bf4f1f7tcjfla53jtfj9u70@4ax.com> References: <46825ff3@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.82.65 X-Trace: newsgroups.borland.com 1182956541 69.69.82.65 (27 Jun 2007 08:02:21 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail