Page 5 of 10
Re: HMG Graph based on Bos Taurus
Posted: Fri Jul 08, 2016 11:15 am
by mol
I have a question (that was on the forum, but I can't find it

)
Is it possible to display generated graph without saving it to a file?
I need to generate temporary image and hold it only in memory
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 12:35 pm
by Rathinagiri
I understand your concern. What we have is a Bitmap Handle in BosTaurus library. That we destroy after saving it to a file. For having that to be retained in the memory I don't know what impacts it will make in memory consumption.
Better Claudio answer this.
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 1:48 pm
by mol
I can destroy it later...
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 2:13 pm
by andyglezl
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 2:57 pm
by srvet_claudio
Rathinagiri wrote:I understand your concern. What we have is a Bitmap Handle in BosTaurus library. That we destroy after saving it to a file. For having that to be retained in the memory I don't know what impacts it will make in memory consumption.
Better Claudio answer this.
The memory consumption is approximately the size of the image saved in BMP format. In practice it does not affect system performance.
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 3:01 pm
by srvet_claudio
mol wrote:I can destroy it later...
Yes. When you do not need more the image must be destroy the bitmap.
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 3:36 pm
by Rathinagiri
In that case, how can we assign the bitmap handle to an Image control of a form?
Re: HMG Graph based on Bas Taurus
Posted: Fri Jul 08, 2016 6:30 pm
by srvet_claudio
Rathinagiri wrote:In that case, how can we assign the bitmap handle to an Image control of a form?
With:
BT_HMGSetImage (cFormName, cControlName, hBitmap, lReleasePrevious)
Sets a specified bitmap into an Image Control of HMG (@...IMAGE) and automatically releases the handle of the bitmap previously associated to the Image Control.
cFormName: is the name (e.g. "Win1") of the parent window.
cControlName: is the name (e.g. "Image1") of the image control.
hBitmap: is a handle to the bitmap to set.
lReleasePrevious: releases of the hBitmap previous associate to Image Control. For default is .T.
Re: HMG Graph based on Bas Taurus
Posted: Sat Jul 09, 2016 2:14 am
by Rathinagiri
Wonderful Claudio. I was not searching for the solution in BT.

Thanks
Re: HMG Graph based on Bas Taurus
Posted: Sat Jul 09, 2016 6:13 am
by mol
Great! Thank you!