Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting hDC for a selected printer
Message
 
À
16/10/2009 10:46:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01429635
Message ID:
01429646
Vues:
45
>My VFP9 app uses VBPrinter.ocx to get a Device Context Handle (hDC) to a printer or PDF Driver, allowing users to select a driver and modify preferences before sending a non VFP Graphics output to the hDC for printing.
>
>This has worked well until we install on 64bit Windows. The VBPrinter.OCX is not registering correctly with the result that an OLE Error message is displays, the object does not get created, and therefore none of its methods are available. I've concluded that this third party untility is not valid for 64bit so I need another method of achieving this. To recap, I use the following methods to find out or to set the Default Printer and the Orientation of the default printer. Once I've done this I use WinAPI functions to create a DC and get its handle (hDC).
>
>DefaultPrinter = .ctrlPrinter.DeviceName
>DefaultOrientation = .ctrlPrinter.Orientation
>
>Can anyone recommend an alternative method?

This might help;
http://blog.moxiedata.com/PermaLink,guid,ba1f3061-a387-4faf-81a5-2cf8d6f520ab.aspx
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform