Recent

Author Topic: Compilation error using 2.0.0  (Read 441 times)

HomeBoy38

  • New member
  • *
  • Posts: 13
Compilation error using 2.0.0
« 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

Michl

  • Full Member
  • ***
  • Posts: 194
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

jamie

  • Hero Member
  • *****
  • Posts: 1202
Re: Compilation error using 2.0.0
« Reply #2 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 ..

HomeBoy38

  • New member
  • *
  • Posts: 13
Re: Compilation error using 2.0.0
« Reply #3 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.