load png from rpreview

load png from rpreview

Postby Silvio.Falconi » Wed Nov 15, 2023 1:16 pm

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
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: load png from rpreview

Postby nageswaragunupudi » Wed Nov 15, 2023 3:34 pm

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: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: load png from rpreview

Postby nageswaragunupudi » Wed Nov 15, 2023 3:56 pm

To use png images on any buttonbar
Code: Select all  Expand view
  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
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: load png from rpreview

Postby Silvio.Falconi » Wed Nov 15, 2023 9:00 pm

nageswaragunupudi wrote:To use png images on any buttonbar
Code: Select all  Expand view
  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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: load png from rpreview

Postby Silvio.Falconi » Thu Nov 16, 2023 7:47 am

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
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: load png from rpreview

Postby nageswaragunupudi » Thu Nov 16, 2023 9:56 am

Code: Select all  Expand view
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
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: load png from rpreview

Postby Silvio.Falconi » Thu Nov 16, 2023 12:47 pm

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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests