ShowUnderlayDlg example for C++ Builder
void __fastcall TForm1::ShowUnderlayDlg1Click(TObject *Sender)
{
L_INT i;
L_INT nRet;
AnsiString FileNames[3]= { "e:\\image1.jpg", "e:\\image2.jpg", "e:\\image3.jpg" };
LEADDlgImgEffect1->ItemsCount = 3;
for ( i= 0; i < 3; i ++ )
{
LEADImage2->LoadStamp ( FileNames[i] );
LEADDlgImgEffect1->ItemDescription [i]= IntToStr(i);
LEADDlgImgEffect1->ItemFileName [i]= FileNames[i];
LEADDlgImgEffect1->ItemBitmap[i]= LEADImage2->Bitmap;
}
LEADDlgImgEffect1->SelectedBitmapIndex = 0;
LEADDlgImgEffect1->UnderlayFlags = UB_TILE;
LEADDlgImgEffect1->DlgFlags = DLG_UNDERLAY_SHOW_PREVIEW |
DLG_UNDERLAY_SHOW_TOOL_ZOOMLEVEL;
LEADDlgImgEffect1->LEADImage = LEADImage1;
nRet= LEADDlgImgEffect1->ShowUnderlayDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
LEADImage1->Underlay ( LEADDlgImgEffect1->SelectedBitmap,
LEADDlgImgEffect1->UnderlayFlags );
}
}