Has anyone encountered a similar problem?
I make a duplication of the picture in TListImag:
ABitmap: = TBitmap.Create ();
ACurrImageIndex: = GetImageIndex ();
Images.GetBitmap (ACurrImageIndex, ABitmap);
Images.Insert (ACurrImageIndex, ABitmap, nil);
At the first call, the picture is inserted at the end of the image collection. On subsequent calls, everything is done correctly.
It seems that something strange happens during the first call to ImageList_Copy (Handle, I, Handle, I + 1, ILCF_SWAP)
What could be the reason and how can it be solved?