ShowAddBitmapsDlg example for Delphi
procedure TForm1.ShowAddBitmapsDlg1Click(Sender: TObject);
var
i: L_INT;
nRet: L_INT;
FileNames: Array [ 0..2 ] of String;
begin
LEADImage1.EnableMethodErrors:= False;
LEADDlgImgEffect1.ItemsCount:= 3;
FileNames[0]:= 'e:\image1.jpg';
FileNames[1]:= 'e:\image2.jpg';
FileNames[2]:= 'e:\image3.jpg';
LEADImage2.Load ( FileNames[0], 0, 1, 1 );
LEADDlgImgEffect1.ItemDescription [0]:= IntToStr(0);
LEADDlgImgEffect1.ItemFileName [0]:= FileNames[0];
LEADDlgImgEffect1.ItemBitmap [0]:= LEADimage2.Bitmap;
for i:= 1 to 2 do
begin
LEADImage2.LoadStamp ( FileNames[i] );
LEADDlgImgEffect1.ItemDescription [i]:= IntToStr(i);
LEADDlgImgEffect1.ItemFileName [i]:= FileNames[i];
LEADDlgImgEffect1.ItemBitmap [i]:= LEADImage2.Bitmap;
end;
LEADDlgImgEffect1.DlgFlags:= DLG_ADDBITMAPS_SHOW_PREVIEW Or
DLG_ADDBITMAPS_SHOW_TOOL_ZOOMLEVEL;
LEADDlgImgEffect1.LEADImage:= LEADImage1;
nRet:= LEADDlgImgEffect1.ShowAddBitmapsDlg ( Self );
if ( nRet = SUCCESS_DLG_OK ) then
begin
if ( LEADDlgImgEffect1.SelectedBitmapList <> 0 ) then
LEADImage1.BitmapList:= LEADDlgImgEffect1.SelectedBitmapList;
end;
end;