A copy of the clipboard on the DC window.

Post Reply
Natter
Posts: 1226
Joined: Mon May 14, 2007 9:49 am

A copy of the clipboard on the DC window.

Post 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 ?
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: A copy of the clipboard on the DC window.

Post by nageswaragunupudi »

Image

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   XImage()

return nil
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1226
Joined: Mon May 14, 2007 9:49 am

Re: A copy of the clipboard on the DC window.

Post by Natter »

Thanks !
Natter
Posts: 1226
Joined: Mon May 14, 2007 9:49 am

Re: A copy of the clipboard on the DC window.

Post by Natter »

Is it possible to estimate the size of the fragment in the clipboard ?
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: A copy of the clipboard on the DC window.

Post 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
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1226
Joined: Mon May 14, 2007 9:49 am

Re: A copy of the clipboard on the DC window.

Post by Natter »

Did I understand correctly that FW_ReadImage (without parameters) accesses the clipboard ?
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: A copy of the clipboard on the DC window.

Post 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?
Regards

G. N. Rao.
Hyderabad, India
MMK
Posts: 13
Joined: Thu Jan 22, 2009 6:24 am

Re: A copy of the clipboard on the DC window.

Post 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!
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: A copy of the clipboard on the DC window.

Post by nageswaragunupudi »

Code: Select all | Expand

hBitmap := FW_GetClipBoardData( 2 )
if hBitmap != nil
  // do whatever you want with hBitmap
endif
Regards

G. N. Rao.
Hyderabad, India
Post Reply