Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer name from hDC printer handle?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Printer name from hDC printer handle?
Divers
Thread ID:
00931585
Message ID:
00931585
Vues:
183
I need to find out the name of the printer that was selected by a user when they print a report.

If I use, REPORT FORM ... TO PRINTER PROMPT, I can't capture the user's printer selection (as far as I know).

If I use the CommonDialog ShowPrinter as in:

loComDialog = newobject( "mscomdlg.commondialog" )
loComDialog.flags = pd_returndc
loComDialog.ShowPrinter()

I get the hDC handle to the printer but how do I use that handle to get a printer name? I have a feeling that it might have to do with the API GetPrinter but I'm stumped at this point.

Any help would be appreciated.

Ed
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform