Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know which printer user selected in ComDlg?
Message
From
19/09/2006 16:56:18
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/09/2006 14:02:37
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01155181
Message ID:
01155274
Views:
33
>>So, question #1: how do I get the printer properties from the hDC? I may just let the dialog set the windows default printer (as the printer doesn't change for VFP if I don't) and then restore it when I'm done, but that's ugly.
>>
>>Question #2: how can I filter out the printers it shows? It shows ALL the printers, and I want to kick out any of them that have "PDF" in the name. Or at least can I have a dialog that shows the printer setup for just one given printer name, without the ability to select a printer? Then I'd have a combo with a (filtered) selection elsewhere.
>
>Dragan,
>
>Maybe not the answer you're after, but still
>
>(1) Why not make a ListBox class (rowsourcetype 0) which you populate with selected printers from aprinters()

That's plan A or plan B - I've changed them so many times in the last two days :).

>(2) per printer in aprinters
>- skip ports a la RPT?: (RedMon port redirector)
>- skip ports a la FILE:
>- find the printerdriver for the printer, skip it if you find the driver suspicous (or even if ADOBE $ upper(printerdriver))

Your code gave me lot of hope, but I couldn't get it to work. No matter what I gave it as printer names, the first function always returned a zero, and the by ref parameters also stayed blank.

I tried calling GetPrinterDriver() with a .hdc (also the so-called "information context", whatever that is) for first parameter, but no cigar either.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform