TariqMehmod
Programmer
Respected Sir,
I have a tif file that contains 2 pages.
I am trying to copy it to _clipboard
So I have these codes
Codes work fine, no issue appears but when I press Ctrl+v in clipboard there is only 1 page instead of 2
It means _clipboard is holding only 1 page.
How is it possible to copy all pages from tif file to clipboard?
Attachment has abc.tif and prg.
Please help
I have a tif file that contains 2 pages.
I am trying to copy it to _clipboard
So I have these codes
Code:
Declare Integer OpenClipboard In User32 Integer
Declare Integer CloseClipboard In User32
Declare Integer EmptyClipboard In User32
Declare Integer SetClipboardData In User32 Integer,Integer
Declare Integer LoadImage In WIN32API Integer,String,Integer,Integer,Integer,Integer
Declare Integer GetClipboardData In User32 Integer
Declare Integer GdipCreateBitmapFromHBITMAP In GDIPlus.Dll Integer, Integer, Integer @
Declare Integer GdipSaveImageToFile In GDIPlus.Dll Integer,String,String @,String @
Declare Long GdipCreateHBITMAPFromBitmap In GDIPlus.Dll Long nativeImage, Long @, Long
Declare Long GdipCreateBitmapFromFile In GDIPlus.Dll String FileName, Long @nBitmap
Declare Long GdipCreateBitmapFromFile In GDIPlus.Dll String FileName, Long @nBitmap
Declare Long CopyImage In WIN32API Long hImage, Long, Long, Long , Long
#Define CF_BITMAP 2
#Define CF_DIB 8
#Define IMAGE_BITMAP 0
#Define LR_LOADFROMFILE 16
#Define LR_MONOCHROME 0x00000001
Local xpict
m.xpict="E:\abc.tif"
Local m.oo
m.oo=Newobject("image")
m.oo.Picture=m.xpict
Local lnWidth,lnHeight
lnWidth=m.oo.Width
lnHeight=m.oo.Height
nBitmap=0
hbm=0
GdipCreateBitmapFromFile(Strconv(m.xpict+0h00,5),@nBitmap)
GdipCreateHBITMAPFromBitmap(nBitmap,@hbm,0)
lhBmp = CopyImage(hbm, 0, m.lnWidth, m.lnHeight,0)
If OpenClipboard(0)!= 0
EmptyClipboard()
SetClipboardData(CF_BITMAP, lhBmp)
CloseClipboard()
Endif
ENDPROC
Codes work fine, no issue appears but when I press Ctrl+v in clipboard there is only 1 page instead of 2
It means _clipboard is holding only 1 page.
How is it possible to copy all pages from tif file to clipboard?
Attachment has abc.tif and prg.
Please help