PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Robert Rioja on January 22, 2016, 01:34:21 AM

Title: FireImage question
Post by: Robert Rioja on January 22, 2016, 01:34:21 AM
How do I load an image into FireImage?  I added an image to the Image Library Manager.  Now I want to programmatically load it into a FireImage control.  I think I have to use something like this:

SendMessage HWND_FRMNAMES_IMGNAMEUP, %FIREIMAGE_SETIMAGENORMAL, %FIREIMAGE_LOADRESOURCE, zImageFile

But what is the last parameter?

Title: Re: FireImage question
Post by: Jean-pierre Leroy on January 22, 2016, 06:20:26 AM
Hi Robert,

In this project I illustrate how to load dynamically a new picture into the FireImage control using the %FIREIMAGE_LOADFILE option.

http://www.planetsquires.com/protect/forum/index.php?topic=2063.0

I'm sorry don't know how to use the %FIREIMAGE_LOADRESOURCE option.

Jean-Pierre
Title: Re: FireImage question
Post by: Paul Squires on January 22, 2016, 09:13:06 AM
The last parameter would be a pointer to the name of the image in the resource file. That name can be found just above the actual preview of the image itself in the Image Manager (eg. "IMAGE_LOVE_PETALS")

Dim sResourceName As String
sResourceName = "IMAGE_LOVE_PETALS"
SendMessage HWND_FORM1_FIREIMAGE1, %FIREIMAGE_SETIMAGENORMAL, %FIREIMAGE_LOADRESOURCE, StrPtr(sResourceName)

Use StrPtr for dynamic strings and VarPtr for zstrings.

Hope that helps
Title: Re: FireImage question
Post by: Robert Rioja on January 22, 2016, 08:55:35 PM
Yes, that is what I needed to know.
Thank you,
Robert