From: Aldo C. <da...@pe...> - 2011-07-16 15:08:22
|
On 24.03.2011 10:36, Jeremy White wrote: > 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. I committed the changes to fix the -background option GDI object leak. I also added a -backgroundbrush option, which can be used instead of -background if you are creating a huge number of windows with the same background. eg. instead of: $window->AddLabel( -background => 0xff00ff, ... ); you can do this: use Win32::GUI::Constants; my $brush = Win32::GUI::Brush->new( -style => BS_SOLID, -color => 0xff00ff, ); $window->AddLabel( -backgroundbrush => $brush, ... ); this way you can effectively use the same $brush for several windows and avoid creating too much GDI objects. (of course you have to take care that $brush remains in scope, otherwise you may get errors or funny looking windows). the changes will be available with the next release of Win32::GUI. cheers, Aldo |