Delphi Imagelist: Load icons with ResourceLoad from a .res

Posted by ben on Stack Overflow See other posts from Stack Overflow or by ben
Published on 2010-06-16T19:41:07Z Indexed on 2010/06/16 20:12 UTC
Read the original article Hit count: 660

Filed under:

Hi guys,

I', trying to load an icon from a res file into an image list. I created the res file with the delphi ImageEditor.

And this way I'm trying to load the icon:

  //if ImageList1.ResourceLoad(rtIcon, 'TEXT_BOLD', clWhite) then
  if imagelist1.GetResource(rtIcon, 'TEXT_BOLD', 0, [lrDefaultColor], clRed) then
    showmessage('loaded')
  else
    showmessage('not loaded');

Both ways doesn't work. Any ideas? Thanks!

© Stack Overflow or respective owner

Related posts about delphi