I was wondering if anyone knows whether it is possible
to use an icon resource from an executable, in much the
same way it can be done with a bitmap.

For example, the following code will try to load the 'LOGO'
resource from an executable (if compiled with, say the PDK),
and if it cannot, then will try to load from the filesystem:

  $bitmap = new Win32::GUI::Bitmap ('LOGO');

  if (!$bitmap) {
      $bitmap = new Win32::GUI::Bitmap ('somelogo.bmp');
  }

How can this be done with an icon?

The same way as with a bitmap - use the name of the icon in the exe.

Cheers,

jez.



Reply via email to