Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
Getting hDC for a selected printer
Versions des environnements
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement