After the new project, add separately on the form: DXDRAW1, DXImageList1;
You can then display the DELPHIX.DXG image in DXDraw1 with only four lines of code below:
procedure TForm1.Button1Click(Sender: TObject);
begin
DXImageList1.Items.LoadFromFile('C:\Temp\DelphiX.dxg');
DXImageList1.DXDraw := DXDraw1;
DXImageList1.Items[0].Draw(DXDraw1.Surface, 10, 10, 0);
DXDraw1.Flip;
end;
If you do not have dxg format image, download this example use of the image bar (download and extract to C:\Temp\):
Http://files.cnblogs.com/del/DelphiX_img.rar
DXImageList1 is a list of images that would have been easy to add with LoadFromFile, but now this command is very difficult to use;
But it doesn't matter, there are other ways to create an image list:
1. Double-click the DXImageList1 icon at design time ... This method is also bad, currently only support DXG and part of BMP (Dib I did not try);
2. Double-click its Items property from DXImageList1 ... This method is good and supports a variety of formats;
3, Tdximagelist is still VCL control, it can interact with other VCL; As long as the other controls can load the picture it can be used.
The following example is a second way to add two pictures, run the effect of the chart: