Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Printer Properties Beta Testers Needed
Message
De
22/09/2005 20:44:11
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01050441
Message ID:
01052247
Vues:
19
You responded:

>DocumentProperties relies on DEVMODE heavily. DEVMODE has a public section that never changes,

Not quite true -- from the documentation for DEVMODE in MSDN:

"A device driver's private data follows the public portion of the DEVMODE structure. The size of the public data can vary for different versions of the structure. The dmSize member specifies the number of bytes of public data, and the dmDriverExtra member specifies the number of bytes of private data."



>section that varies from printer to printer. DEVMODE has a dmFields field that has flags for each of the
>properties that indicate if that PROPERTY is available for the current printer. NOTE: This is not the same thing
>as the setting for that property!

dmFields should indicate if the property is available: the desired property is checked by ANDing the property name value with the dmFields value -- if TRUE then the printer supports this capability.

>I'm having no problem checking and manipulating the DEVMODE structure for setting a property. What I need to do
>first is verify that the setting is available for that property on that printer. For that you need
>DeviceCapabilities, but you don't need DEVMODE at all.

After knowing that the property is available, the DeviceCapabilities should give the various settings for that property. A NULL is passed first to determine the size, then allocate the memory and call to retrieve the values.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform