Re: [perl-win32-gui-users] problem of reusing memory

2011-03-25 Thread Waldemar Biernacki
Hi,


 Cool - do some major testing with your app, and if things are still OK, the
 fix (well, a version of it) will get committed to CVS. 

Until now I rewrote my application to use the fix and first tests are really 
promising. By the way, this tremendous GDI object number was due to the fact 
that each label and textfield had its own font which in turn is just GDI object 
and the same with background.

Syntax of background color in Win32::GUI is little misleading (-background = 
0xff) as it suggests that it is simple attribute of a widget. But it is not 
the case: each background is full GDI object too! Maybe - I am just 
speculating - that was the fundamental reason why the background color error 
raised? Who - at first sight - could see that there is a such big difference 
between -background and -foreground? 

So these two problems seems to be overcome for me and I am much more happy!

 Interesting that
 you are still having memory issues with 5.12. This could be another issue
 within Win32::GUI that only manifests in those versions of perl... 

I have to check it once again. For a few days I've got such a big mess in my 
Perl environments so I could overlooked something. I hope to do it in this 
weekend.

Cheers,

Waldemar.



--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Re: [perl-win32-gui-users] problem of reusing memory

2011-03-25 Thread Aldo Calpini
On 25.03.2011 11:07, Waldemar Biernacki wrote:
 Until now I rewrote my application to use the fix and first tests are really
 promising. By the way, this tremendous GDI object number was due to the fact
 that each label and textfield had its own font which in turn is just GDI 
 object
 and the same with background.

as I just wrote in another mail, there should be no problem with fonts, 
because you create them explicitly. this means the same GDI object is 
used for all controls. only the brush is created on-demand for background.

 Syntax of background color in Win32::GUI is little misleading (-background =
 0xff) as it suggests that it is simple attribute of a widget. But it is 
 not
 the case: each background is full GDI object too! Maybe - I am just
 speculating - that was the fundamental reason why the background color error
 raised? Who - at first sight - could see that there is a such big difference
 between -background and -foreground?

the difference is in the Win32 API. they allow a plain COLORREF for 
foreground, but only a HBRUSH for background (even if you just want a 
solid color, you have to create a solid brush for this). I thought it 
was user friendlier to automatically create a brush of the given 
color. it's just that I forgot to clean it up afterwards :-)

maybe it would be a good idea to add a -backgroundbrush option, so you 
can pass a Win32::GUI::Brush object to it and the same GDI object will 
be used for all controls, as with fonts.

cheers,
Aldo

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/