How to load jpg image from resources ?

How to load jpg image from resources ?

Postby Baxajaun » Mon Aug 01, 2016 4:04 pm

Hi,

how to load jpg image from resouce file ?

Thanks in advance.

Best regards,
User avatar
Baxajaun
 
Posts: 968
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: How to load jpg image from resources ?

Postby cnavarro » Mon Aug 01, 2016 4:49 pm

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6522
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How to load jpg image from resources ?

Postby nageswaragunupudi » Tue Aug 02, 2016 4:10 pm

That is outdated.
Present versions of FWH load jpgs from resources automatically without any specific coding by the programmer.

Now it is very simple and as simple as loading bitmaps from rc file.

Sample rc file
olga.rc
Code: Select all  Expand view
#define JPEG 10

OLGA    JPEG c:\fwh\bitmaps\olga1.jpg

 


Program reading Jpeg image from resource:
Code: Select all  Expand view

#include "fivewin.ch"

function jpgfromrc

   local oDlg

   DEFINE DIALOG oDlg SIZE 300,300 PIXEL TRUEPIXEL TITLE "JPEG FROM RESOURCE"

   @ 50,75 BTNBMP RESOURCE "OLGA" SIZE 150,200 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

return nil
 


Result:
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10471
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: How to load jpg image from resources ?

Postby Baxajaun » Tue Aug 02, 2016 5:47 pm

Thanks Cristóbal !

Thanks Mr. Rao !
User avatar
Baxajaun
 
Posts: 968
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 84 guests