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 filehttp://www.news2news.com/vfp/?example=189Printing the image of a FoxPro formhttp://www.news2news.com/vfp/?example=158How to print a bitmap filehttp://www.news2news.com/vfp/?example=211Storing screen shot of a form to a bitmap filehttp://www.news2news.com/vfp/?example=187Using the LoadImage() to display a bitmap file on the main VFP windowhttp://www.news2news.com/vfp/?example=210