FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to load jpg image from resources ?
Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
How to load jpg image from resources ?
Posted: Mon Aug 01, 2016 04:04 PM

Hi,

how to load jpg image from resouce file ?

Thanks in advance.

Best regards,

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How to load jpg image from resources ?
Posted: Mon Aug 01, 2016 04: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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to load jpg image from resources ?
Posted: Tue Aug 02, 2016 04: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 (fw): Select all Collapse
#define JPEG 10

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


Program reading Jpeg image from resource:
Code (fw): Select all Collapse
#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:
Regards



G. N. Rao.

Hyderabad, India
Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
Re: How to load jpg image from resources ?
Posted: Tue Aug 02, 2016 05:47 PM

Thanks Cristóbal !

Thanks Mr. Rao !

Continue the discussion