putting_20an_20image_20on_20the_20clipboard
Putting an image on the clipboard
by Richard Russell, March 2012
Putting an image on the clipboard is straightforward:
cx% = 0
cy% = 0
hbitmap% = FNloadimage(pic$, cx%, cy%, 0)
SYS "OpenClipboard", @hwnd%
SYS "EmptyClipboard"
SYS "SetClipboardData", CF_BITMAP, hbitmap%
SYS "CloseClipboard"
Here pic$ is the full path and filename to the image file (which can be a BMP, EMF, GIF, ICO, JPEG or WMF). If you want to support a wider range of formats (including PNG and TIFF) then call FNloadimagegdip or FNloadimagegdip2 rather than FNloadimage.
putting_20an_20image_20on_20the_20clipboard.txt · Last modified: 2024/01/05 00:21 by 127.0.0.1