Hi, I have some code that creates two ImageList objects: our $ARCHIVE = new Win32::GUI::ImageList(64,64,ILC_COLOR32,0,100); our $ICONS = new Win32::GUI::ImageList(16,16,ILC_COLOR32 | ILC_MASK,0,10);
don't worry about those constants, they're defined at the top of my script as: ILC_COLOR32 => 0x00000020, ILC_MASK => 0x00000001 A listview is set to use imagelist $ICONS, and another listview is set to use imagelist $ARCHIVE. However, On adding even one image to $ARCHIVE, both listviews always show images from $ARCHIVE. In fact $ICONS shows 16x16 segments of 64x64 images added to $ARCHIVE. I'm adding images to $ICONS and $ARCHIVE like so: $ICONS->Add(new Win32::GUI::Bitmap("resource/downgreen_i.bmp"),new Win32::GUI::Bitmap("resource/down_m.bmp")); # the above is done outside of any subroutine. $ARCHIVE->Add(new Win32::GUI::Bitmap("archivetemp.bmp")); # the above is done in an addfilestoarchive function. I've no idea what's causing $ICONS to always show images from $ARCHIVE. $ICONS is filled at the start of the application, $ARCHIVE is cleared and filled whenever the addfilestoarchive sub is called. Do my bitmap objects need to be persistent or something? I would have thought perl's garbage collector would realise not to clear the anonymous bitmap objects created with ImageList::Add. Help! Steve Pick perl-win32-gui-users@lists.sourceforge.net