need to copy on runtime GDIPPictureContainer to TPictureContaine (500+ images so I dont want to create it manually)
I do it like this but I don't get any images displayed. Can you see what I am doing wrong?
stream := TMemoryStream.Create;
try
//copy images from GDIPlist to List
for i := 0 to data.pcListImages.Items.Count-1 do
begin
stream.Clear;
pic := pc1.Items.Add;
pic.Name := data.pcListImages.Items.Name;
pic.Tag := data.pcListImages.Items.Tag;
pic.DisplayName := data.pcListImages.Items.DisplayName;
data.pcListImages.Items.Picture.SaveToStream(stream);
stream.Position := 0;
pic.Picture.LoadFromStream(stream);
end;
finally
stream.Free;
end;