HMG 3.3.1 (Stable)
Moderator: Rathinagiri
Re: HMG 3.3.1 (Stable)
I've found problem with pictures on buttons (I'm using .bmp files).
In previous version e.g. hmg 3.1.5 everything was OK, but, in current version transparency of bitmap is ignored:
[img]www://molsystemy.pl/hmg/hmg331_picturebutton.jpg[/img]
In previous version e.g. hmg 3.1.5 everything was OK, but, in current version transparency of bitmap is ignored:
[img]www://molsystemy.pl/hmg/hmg331_picturebutton.jpg[/img]
Re: HMG 3.3.1 (Stable)
Hi Claudio!
Thanks for this patch, but, could you place this solution with set base filename for saving printout to file?:
viewtopic.php?f=43&t=3827&p=36042#p36042" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
and solution with PDF creation, too.
Best regards, Marek
Thanks for this patch, but, could you place this solution with set base filename for saving printout to file?:
viewtopic.php?f=43&t=3827&p=36042#p36042" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
and solution with PDF creation, too.
Best regards, Marek
- srvet_claudio
- Posts: 2223
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.3.1 (Stable)
Hi Marek,mol wrote:I've found problem with pictures on buttons (I'm using .bmp files).
In previous version e.g. hmg 3.1.5 everything was OK, but, in current version transparency of bitmap is ignored:
[img]www://molsystemy.pl/hmg/hmg331_picturebutton.jpg[/img]
You could upload some BMP pictures that cause transparency problem.
OK.mol wrote:Hi Claudio!
Thanks for this patch, but, could you place this solution with set base filename for saving printout to file?:
viewtopic.php?f=43&t=3827&p=36042#p36042" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
and solution with PDF creation, too.
Best regards, Marek
- srvet_claudio
- Posts: 2223
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.3.1 (Stable)
Done !Rathinagiri wrote:Pablo, this we will do in the next release. Thanks a lot.Pablo César wrote:Yes Marek, you are right !mol wrote:I found a difference in h_HMG_HPDF.PRG source file.
In _HMG_HPDF_PRINT function definition, some piece of code from line 283 looks like that:In _HMG_HPDF_MULTILINE_PRINT function definition, adequate line (no. 372) differents from above:Code: Select all
If HMG_UPPER( HB_USUBSTR( cFontName, HMG_LEN( cFontName ) - 3 ) ) == '.TTF' // load ttf font
Difference is in recognizing .TTF extension. First line is good, second is bad.Code: Select all
If HMG_UPPER( HB_USUBSTR( cFontName, HMG_LEN( cFontName ) - 4 ) ) == '.TTF' // load ttf font
I've changed 4 to 3 in line 372, recompiled library, and it's work OK to me.
I'm testing forward.
It's a bug to correct in the next version of HMG, I think.
Regards, Marek
I have published this solution at viewtopic.php?p=35144#p35144 because EduardoLuis has appointed this same fail. Even with solution in our hands, nothing happen at new releases.
Only strong discusions about this...
- srvet_claudio
- Posts: 2223
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.3.1 (Stable)
Done!mol wrote:Hi Claudio!
Thanks for this patch, but, could you place this solution with set base filename for saving printout to file?:
viewtopic.php?f=43&t=3827&p=36042#p36042" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
and solution with PDF creation, too.
Best regards, Marek
Re: HMG 3.3.1 (Stable)
You can download sample images:srvet_claudio wrote: Hi Marek,
You could upload some BMP pictures that cause transparency problem.
http://www.molsystemy.pl/hmg/szukaj.bmp" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

http://www.molsystemy.pl/hmg/cert.bmp" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

http://www.molsystemy.pl/hmg/drukuj16.bmp" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

Re: HMG 3.3.1 (Stable)
WOW!srvet_claudio wrote:Done!mol wrote:Hi Claudio!
Thanks for this patch, but, could you place this solution with set base filename for saving printout to file?:
viewtopic.php?f=43&t=3827&p=36042#p36042" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
and solution with PDF creation, too.
Best regards, Marek
You're really Speedy Gonzales!

Re: HMG 3.3.1 (Stable)
I've applied patch2 and I can't compile my project
I'm getting error:
I'm getting error:
Code: Select all
C:\hmg\include\i_tree.ch(233) Error E0003 Duplicate variable declaration '_HMG_THIS_TREEITEM_VALUE'
Re: HMG 3.3.1 (Stable)
My colleague posted to me in the matter of memory leaking while intense use of LABEL Control.
After few thousand of changing label value, usage of memory increases to really big value - eg. from 1548KB to 24652KB ater 100.000 changes.
Here is a little sample:
Normally, this label is used to observe changes on COM Port and should be observed continously.
After few thousand of changing label value, usage of memory increases to really big value - eg. from 1548KB to 24652KB ater 100.000 changes.
Here is a little sample:
Code: Select all
/*
* HMG - Harbour Win32 GUI library Demo
*
* Copyright 2002 Roberto Lopez <mail.box.hmg@gmail.com>
* http://www.hmgforum.com//
*/
#include "hmg.ch"
Function Main
DEFINE WINDOW Form_Main ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'Main Window' ;
MAIN
@ 200,250 LABEL Label_1 ;
WIDTH 150 HEIGHT 40 ;
VALUE 'Click Me !' ;
ACTION test();
FONT 'Arial' SIZE 24 CENTERALIGN
@ 10,10 LABEL Label_2 ;
AUTOSIZE ;
VALUE '...' ;
ACTION msginfo('test')
END WINDOW
Form_Main.Label_2.Value := 'Hello All, This Is An AutoSIzable Label!!!'
CENTER WINDOW Form_Main
ACTIVATE WINDOW Form_Main
Return
procedure test
local i
for i:=1 to 100000
form_main.label_1.value:=str(i)
next
form_main.label_1.value:='Click Me !'
MsgInfo('Label Clicked!!!')
return
Re: HMG 3.3.1 (Stable)
Hi!mol wrote:My colleague posted to me in the matter of memory leaking while intense use of LABEL Control.
After few thousand of changing label value, usage of memory increases to really big value - eg. from 1548KB to 24652KB ater 100.000 changes.
...
Normally, this label is used to observe changes on COM Port and should be observed continously.
Indeed running your sample (compiled with hmg 3.3.1) memory usage increases to almost ~25 GBytes.
Interestingly, hmg extended does not suffer from such a mem 'leakage'.
A partial workaround could be to replace the label control with a textbox, which eliminates by a half or so, the problem (memory usage ~ 10 GB).
Also a <do events> statement exactly after <form_main.label_1.value:=str(i)> line
could help to reduce cpu overhead (at least in your given example -don't know how it is the real code implemented but even there you should consider to add this line)
(hint: instead of str() you may want to use hb_ntos() which i think is faster).
Conclusively, the problem you describe is present in hmg official.
Probably an in depth study of hmg extended implementation could help maintainers to fix this.
HTH,
---
Pete