Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print Image From Clipboard
Message
 
To
17/05/2003 13:54:18
Fabian Belo
Independent Developer
Argentina
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00789511
Message ID:
00789740
Views:
28
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform