load png from rpreview

Post Reply
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

load png from rpreview

Post by Silvio.Falconi »

I need to coverte this function to use on rpreview to load my png images

oBtn:hBitmap1 = FWBitmap2( "EXCEL" )

it run but the image is compress so is not compatible with png

STATIC FUNCTION FWBitmap2( cResname )
LOCAL oBitmap
DEFINE BITMAP oBitmap RESNAME cResname
IF HB_IsObject( oBitmap )
RETURN oBitmap:hBitmap
ENDIF
RETURN 0
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: load png from rpreview

Post by nageswaragunupudi »

to use on rpreview to load my png images
Do you want to use png images on the buttonbar for rpreview?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: load png from rpreview

Post by nageswaragunupudi »

To use png images on any buttonbar

Code: Select all | Expand

   DEFINE BUTTONBAR oBar OF oWnd SIZE 64,64 2010
   DEFINE BUTTON OF oBar FILE "..\bitmaps\pngs\image7.png(32x32)" PROMPT "Onr"
   DEFINE BUTTON OF oBar FILE "..\bitmaps\pngs\image8.png(32x32)" PROMPT "Two"
   DEFINE BUTTON OF oBar FILE "..\bitmaps\pngs\image9.png(32x32)" PROMPT "Three"
 
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

Re: load png from rpreview

Post by Silvio.Falconi »

nageswaragunupudi wrote:To use png images on any buttonbar

Code: Select all | Expand

   DEFINE BUTTONBAR oBar OF oWnd SIZE 64,64 2010
   DEFINE BUTTON OF oBar FILE "..\bitmaps\pngs\image7.png(32x32)" PROMPT "Onr"
   DEFINE BUTTON OF oBar FILE "..\bitmaps\pngs\image8.png(32x32)" PROMPT "Two"
   DEFINE BUTTON OF oBar FILE "..\bitmaps\pngs\image9.png(32x32)" PROMPT "Three"
 
Image
Yes of course but Then i have problems with zoom buttons because have two pngs
Hbitmap1 and hbitmap2
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

Re: load png from rpreview

Post by Silvio.Falconi »

oPreview:oZoom:hBitmap1 = FWBitmap( "Zoom2" )
oPreview:oZoom:hBitmap2 = FWBitmap( "OnePage2" )
oPreview:oZoom:bBmpNo = { || If( oPreview:lZoom, 2, 1 ) }


How I can converte it ? How I can change the images with mine pngs ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: load png from rpreview

Post by nageswaragunupudi »

Code: Select all | Expand

oPreview:oZoom:hBitmap1 = FW_ReadImage( nil, "aa.png(32x32)" )[ 1 ]
oPreview:oZoom:hBitmap2 = FW_ReadImage( nil, "bb.png(32x32)" )[ 1 ]
oPreview:oZoom:bBmpNo = { || If( oPreview:lZoom, 2, 1 ) }
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

Re: load png from rpreview

Post by Silvio.Falconi »

Now Run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply