FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A copy of the clipboard on the DC window.
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
A copy of the clipboard on the DC window.
Posted: Tue May 28, 2024 09:01 AM

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 ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: A copy of the clipboard on the DC window.
Posted: Tue May 28, 2024 11:49 AM

Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   XImage()

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: A copy of the clipboard on the DC window.
Posted: Tue May 28, 2024 12:22 PM

Thanks !

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 08:36 AM

Is it possible to estimate the size of the fragment in the clipboard ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 12:05 PM
Code (fw): Select all Collapse
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
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 12:14 PM

Did I understand correctly that FW_ReadImage (without parameters) accesses the clipboard ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: A copy of the clipboard on the DC window.
Posted: Fri May 31, 2024 02:30 PM
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?
Regards



G. N. Rao.

Hyderabad, India
Posts: 16
Joined: Thu Jan 22, 2009 06:24 AM
Re: A copy of the clipboard on the DC window.
Posted: Thu Jun 06, 2024 02:36 PM
nageswaragunupudi 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!
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: A copy of the clipboard on the DC window.
Posted: Thu Jun 06, 2024 03:02 PM
Code (fw): Select all Collapse
hBitmap := FW_GetClipBoardData( 2 )
if hBitmap != nil
  // do whatever you want with hBitmap
endif
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion