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 13:34:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
How to know which printer user selected in ComDlg?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01155181
Message ID:
01155181
Views:
94
This is related to the other thread (thread #1154292 part II).

After googling it out for numerous hours, I still don't see the connection between the dialog ActiveX object, the host it runs for, and how to get the user selection from it. The only way I found to retrieve something from it is to set it to keep the hDC of the selected printer, but then I can't find a way to find the printer name from hDC. Michel's restriction on keywords in search is partially to blame, "printer from hdc" won't work, "from" is a keyword, and "printer hdc" gives me all the myriad messages about printing from RTF control :).

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.

back to same old

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

Click here to load this message in the networking platform