Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Picture object from stdole2.tlb
Message
De
26/03/2002 06:01:01
 
 
À
26/03/2002 00:41:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00634339
Message ID:
00637148
Vues:
21
>Alexandr ,
>
>Could you please elaborate more on hDC from Printer common dialog
>

An hDC is a device context for a graphic device - the screen or a printer. The hDC is a device context handle, which can be retrieved trivially using the WinAPI call CreateDC():
DECLARE CreateDC IN Win32API INTEGER, STRING @, INTEGER, INTEGER
nMyhDC = CreateDC(0,cWindowsPrinterName,0,0)
This returns a usable device context that can be used to reference a printer. When you have finished working with the printer in the specific context you used the hDC for, you should release it with DeleteDC()
DECLARE SHORT DeleteDC IN WIN32API INTEGER
=DeleteDC(nMyhDC)
The MSDN library covers device contexts in great detail. The VB docs cover the device context from the perspective of the VB Printer Object - Dan Appleman's book on the Win32 API for VB Programmers gives a much more concise and understandable discussion, albeit using VB syntax, but the differences from your POV are completely trivial. You can obtain the name of the printer from the array returned by APRINTERS(), GETPRINTER(), etc.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform