Copy system icons to ImageList

  • Thread starter Thread starter Peter Larsen
  • Start date Start date
P

Peter Larsen

Hi,

How do i copy the images from handle to an instance of ImageList ??

This is what i have :

Win32Ass.SHFILEINFO shinfo = new Win32Ass.SHFILEINFO();
IntPtr hImgSmall; //the handle to the system image list
hImgSmall = Win32Ass.SHGetFileInfo("c:\\", 0, ref shinfo,
(uint)Marshal.SizeOf(shinfo), Win32Ass.SHGFI_SYSICONINDEX |
Win32Ass.SHGFI_SMALLICON);

ImageList iList = new ImageList();

How do i copy the icons from hImgSmall to the image list ??

Thank you in advance.
BR
Peter
 
Back
Top