Earlier this-evening I committed a change to they way the internal LoadImage() functions searches for Bitmaps, Icons and Cursors, prompted by a patch Reini Urban submitted to me.

I've updated the docs for Win32::GUI::Icon->new to read:

# (@)METHOD:new Win32::GUI::Icon(FILENAME)
# Creates a new Icon object reading from FILENAME.
#
# If FILENAME is a string, then it is first tried as a resource
# name, then a filename.  If FILENAME is a number it is tried
# as a resource identifier.
#
# Resources are searched for in the current exe (perl.exe unless
# you have packed your application using perl2exe, PAR or similar),
# then in the Win32::GUI GUI.dll, and finally as an OEM resource
# identifier

And similar wording for the bitmap and cursor constructors.

The result is that now, as well as loading these object from files, you now have better access to embedded resources:

for example:
my $icon = Win32::GUI::Icon->new(IDI_DEFAULTCON);
  gives you the Win32::GUI camel icon
my $icon = Win32::GUI::Icon->new("PERLEXE");
  gives you the ActiveState 'lizard' icon (assuming you're using AS perl)

There's a new application in the samples directory that allows you to browse all the win32 built-in resources (standard icons, bitmaps and cursors), and Win32::GUI::Constants has been updated to include the required identifiers.

Regards,
Rop.
--
Robert May
Win32::GUI, a perl extension for native Win32 applications
http://perl-win32-gui.sourceforge.net/


Reply via email to