Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print Image From Clipboard
Message
 
À
17/05/2003 13:54:18
Fabian Belo
Independent Developer
Argentine
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00789511
Message ID:
00789740
Vues:
26
This message has been marked as the solution to the initial question of the thread.
Step by step:

(1) open clipboard and check if data in CF_BITMAP format is available
API functions OpenClipboard, GetClipboardData, GetObjectType, CloseClipboard

(2) retrieve device context and some geometrical parameters for a printer
API functions GetActiveWindow, GetWindowDC, GetDefaultPrnDC, CreateDC, GetDeviceCaps

(3) get bitmap binary data using GetDIBits function, populate DOCINFO structure, and then use StretchDIBits to send bitmap to the printer
API functions GetDIBits, StartDoc, StartPage, StretchDIBits, EndPage, EndDoc

* * *
FoxPro code samples (members area):

Storing clipboard contents to a bitmap file
http://www.news2news.com/vfp/?example=189

Printing the image of a FoxPro form
http://www.news2news.com/vfp/?example=158

How to print a bitmap file
http://www.news2news.com/vfp/?example=211

Storing screen shot of a form to a bitmap file
http://www.news2news.com/vfp/?example=187

Using the LoadImage() to display a bitmap file on the main VFP window
http://www.news2news.com/vfp/?example=210
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform