PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Barry Marks on November 14, 2009, 10:42:59 PM

Title: Loading JPEG images into FireImage controls dynamically
Post by: Barry Marks on November 14, 2009, 10:42:59 PM
I've been playing with the FireImage control with JPG files and I'm very glad to have that.  However, I don't see any clues on how to dynamically load a JPG into the control.  Is there some help on this?  I didn't find any.

If this will be coming in the not too distant future in the educational stuff you talked about I'm happy to wait.  I'm just playing with things to try to figure out how to use all this.

Barry
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Paul Squires on November 14, 2009, 11:57:38 PM
The message equates are listed in the FireImage.inc file.


%FIREIMAGE_SETIMAGENORMAL = %WM_USER + 100  ' Normal image
%FIREIMAGE_SETIMAGEHOT    = %WM_USER + 101  ' Hot Image
%FIREIMAGE_SETIMAGEDIS    = %WM_USER + 102  ' Disabled
%FIREIMAGE_SETFITSTYLE    = %WM_USER + 103  ' Autosize, Actual size, etc..
%FIREIMAGE_SETBACKCOLOR   = %WM_USER + 104  ' Back color when image does not fill entire window

%FIREIMAGE_AUTOSIZE       = 0    ' Autoadjusts the image to the width or height of the control
%FIREIMAGE_ACTUALSIZE     = 1    ' Shows the image with its actual size
%FIREIMAGE_FITTOWIDTH     = 2    ' Adjusts the image to the width of the control
%FIREIMAGE_FITTOHEIGHT    = 3    ' Adjusts the image to the height of the control
%FIREIMAGE_STRETCH        = 4    ' Adjusts the image to the height and width of the control

%FIREIMAGE_LOADRESOURCE   = 0
%FIREIMAGE_LOADFILE       = 1
%FIREIMAGE_LOADSTRING     = 2


To set the normal image from a disk file:
sFilename = "MyPicture.jpg"
SendMessage HWND_FORM1_FIREIMAGE1, %FIREIMAGE_SETIMAGENORMAL, %FIREIMAGE_LOADFILE, StrPtr(sFilename)
SendMessage HWND_FORM1_FIREIMAGE1, %FIREIMAGE_SETFITSTYLE, %FIREIMAGE_STRETCH

Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Jean-pierre Leroy on November 15, 2009, 06:04:42 AM
Barry,

I've just uploaded a sample FireFly project called FireImageDemo to illustrate some aspects of the FireImage control.

I hope it could be of some help.

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

Jean-Pierre
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Ivan Iraola on November 15, 2009, 10:47:13 AM
I haven't played much with pictures yet, but I have a question, how do you place a picture as the form background?
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Marc van Cauwenberghe on November 15, 2009, 10:59:53 AM
Hello Ivan. I think you have to use the BackBitmap property of the form.

Marc
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Ivan Iraola on November 15, 2009, 12:23:41 PM
Quote from: Marc van Cauwenberghe on November 15, 2009, 10:59:53 AM
Hello Ivan. I think you have to use the BackBitmap property of the form.

Marc

Yes, but we are talking able to change it dynamicaly.
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Marc van Cauwenberghe on November 15, 2009, 01:00:39 PM
Oops, sorry. :-[
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Barry Marks on November 15, 2009, 04:22:31 PM
Quote from: Jean-Pierre Leroy on November 15, 2009, 06:04:42 AM
I've just uploaded a sample FireFly project called FireImageDemo to illustrate some aspects of the FireImage control.

I hope it could be of some help.

Thanks.  I just ran it and it seems to do what I was asking about and even some of the stuff I'd probably have asked about next. :)

Now all I have to do is try to understand it.  I've been doing graphics with DDT and this SDK stuff is different.  I've been wanting to be able to use JPG for some time.

Barry
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Barry Marks on November 15, 2009, 04:27:07 PM
Quote from: TechSupport on November 14, 2009, 11:57:38 PM
The message equates are listed in the FireImage.inc file.

Thanks.  I'll study this and play with it.  A lot of what I do involves simple graphics.

I should have thought to look for an include file for the controls but I didn't.

Barry
Title: Re: Loading JPEG images into FireImage controls dynamically
Post by: Jean-pierre Leroy on January 17, 2010, 04:08:12 AM
Paul,

Once a picture is loaded on the FireImage control, what sort of message can I send to the FireImage control to reset it ? (in order to have the control in his initial state without any picture).

Thanks,
Jean-Pierre