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

2011-07-16 Thread Aldo Calpini
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

--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
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] New folder option on Browse for folder

2011-07-16 Thread Aldo Calpini
On 31.08.2010 01:12, Hulley, Rob (APJ GCC Storage TPM) wrote:
 Hi Everyone,

 I am using “Win32::GUI::BrowseForFolder” .

 I cannot work out how to add the “create new” option as seen on other
 “browse for folder” windows.

 Is this feature available?

hi,

I just added two options to the BrowseForFolder function:

-newui = 0/1 (default 0)
 use the new user interface (which has a New folder button)
-nonewfolder = 0/1 (default 0)
 hides the New folder button (only meaningful with -newui = 1)

those will be available with the next release of Win32::GUI. or if you 
don't want to wait, you can checkout the cvs and build Win32::GUI 
yourself :-)

cheers,
Aldo

--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
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/