Page 1 of 1
A copy of the clipboard on the DC window.
Posted: Tue May 28, 2024 9:01 am
by Natter
Using scissors, I cut out a rectangular fragment of the screen and put it on the clipboard.
How can I put an image from the clipboard on the DC of my window ?
Re: A copy of the clipboard on the DC window.
Posted: Tue May 28, 2024 11:49 am
by nageswaragunupudi
Code: Select all | Expand
#include "fivewin.ch"
function Main()
XImage()
return nil
Re: A copy of the clipboard on the DC window.
Posted: Tue May 28, 2024 12:22 pm
by Natter
Thanks !
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 8:36 am
by Natter
Is it possible to estimate the size of the fragment in the clipboard ?
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 12:05 pm
by nageswaragunupudi
Code: Select all | Expand
aImage := FW_ReadImage() // no params
? aImage[ 3 ], aImage[ 4 ] // width and height in pixels
If there is no image in the clipboard, these values would be 0,0
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 12:14 pm
by Natter
Did I understand correctly that FW_ReadImage (without parameters) accesses the clipboard ?
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 2:30 pm
by nageswaragunupudi
Natter wrote:Did I understand correctly that FW_ReadImage (without parameters) accesses the clipboard ?
Yes, but if you are using the recent versions. ( FWH2310 and later)
What is the version you are using?
Re: A copy of the clipboard on the DC window.
Posted: Thu Jun 06, 2024 2:36 pm
by MMK
nageswaragunupudi wrote:Natter wrote:Did I understand correctly that FW_ReadImage (without parameters) accesses the clipboard ?
Yes, but if you are using the recent versions. ( FWH2310 and later)
What is the version you are using?
And if version 2306?
Thank you!
Re: A copy of the clipboard on the DC window.
Posted: Thu Jun 06, 2024 3:02 pm
by nageswaragunupudi
Code: Select all | Expand
hBitmap := FW_GetClipBoardData( 2 )
if hBitmap != nil
// do whatever you want with hBitmap
endif