Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send a bitmap to the clipboard?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00913824
Message ID:
00913836
Views:
16
The _CLIPTEXT functionality is limited, at least prior to the version 9. Clipboard API combined with either Bitmap or Enhanced Metafile API can do the trick.

The Enhanced Metafile approach is probably the easiest one. Use CreateEnhMetaFile and CloseEnhMetaFile to open bitmap file and obtain handle to it. Use SetClipboardData with uFormat=CF_ENHMETAFILE to place this handle on the clipboard.

Follow the links to get API declarations as well as some FoxPro code samples (members area):

Clipboard API
http://www.news2news.com/vfp/?group=6

Bitmap API
http://www.news2news.com/vfp/?group=2

Enhanced Metafile API
http://www.news2news.com/vfp/?group=44


Copying picture of the active form to the Clipboard using Bitmap API functions
http://www.news2news.com/vfp/?example=91

Copying picture of the active form to the Clipboard using Enhanced Metafile API functions
http://www.news2news.com/vfp/?example=404

Storing content of the Clipboard to a bitmap file
http://www.news2news.com/vfp/?example=189

Enumerating data formats currently available on the clipboard
http://www.news2news.com/vfp/?example=32
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform