Lazarus

Programming => General => Topic started by: HomeBoy38 on February 11, 2019, 10:30:41 pm

Title: Compilation error using 2.0.0
Post by: HomeBoy38 on February 11, 2019, 10:30:41 pm
Hi,

I have just upgraded to 2.0.0 and I know have a compilation error here :
Code: Pascal  [Select][+][-]
  1. ListItem.ImageIndex := ImageList_ReplaceIcon(Icons.Handle, ListItem.ImageIndex, MyIcon.Handle);
Error: identifier idents no member "Handle"

Icons is type of TImageList, MyIcon is type of TIcon and ListItem is type of TListItem.
ImageList_ReplaceIcon is coming from CommCtrl.
Code: Pascal  [Select][+][-]
  1. function ImageList_ReplaceIcon(himl:HIMAGELIST;i:cint;hicon:HICON):cint; stdcall; external commctrldll name 'ImageList_ReplaceIcon';

It definitely seems that TIcon is missing the Handle property. So far, I do not know if it is intentional (and I need to look further in order to correct it) or if it is an issue introduced with the new version?

Thanks for your advices
Title: Re: Compilation error using 2.0.0
Post by: Michl on February 11, 2019, 10:48:32 pm
See: http://forum.lazarus.freepascal.org/index.php/topic,44186.msg310467.html#msg310467 (http://forum.lazarus.freepascal.org/index.php/topic,44186.msg310467.html#msg310467)
Title: Re: Compilation error using 2.0.0
Post by: jamie on February 11, 2019, 10:54:40 pm
The handle property isn't public anymore with the new release for the TImageList..

But.. all is not lost I guess..

 ImageList.reference.Handle;

 as for the TiCon, I still see the Handle property ..
Title: Re: Compilation error using 2.0.0
Post by: HomeBoy38 on February 12, 2019, 07:52:25 am
Thanks for your quick advice, I am confused that I asked an already answered question, I have searched before asking but failed, I may have not searched for the correct terms.
TinyPortal © 2005-2018