So are you saying this is possible:

  $icon = new Win32::GUI::Bitmap ('MYICON');
  $window->SetIcon ($icon) if ($icon);

I'm using Perlapp's --icon switch to attach a icon to the
executable. However, icon resources don't have names, and
so to get the above to work, I would need to use a resource
editor to add another icon resource and name it. Is this
correct?

Sorry, my explanation was poor:)

Both Win32::GUI::Bitmap and Win32::GUI::Icon can load resources from the running exe, i.e.:

Win32::GUI::Icon('0')

would load an icon called '0'.

If the resources don't have names, you wont be able to load them. You can use a resource editor to add/change the resources in the exe generated via PerlApp, I do this with string tables, icons and bitmaps. I use resource hacker, as it has a command line interface so you can automate the build process.

Cheers,

jez.



Reply via email to