ShowAddFrameDlg example for C++ Builder
void __fastcall TForm1::ShowAddFrameDlg1Click(TObject *Sender)
{
L_INT i;
L_INT nRet;
AnsiString FileNames [ 3 ]= {"e:\\image1.jpg",
"e:\\image2.jpg",
"e:\\image3.jpg" };
LEADDlgImage1->ItemsCount = 3;
for ( i= 0; i < 3; i++ )
{
LEADImage2->LoadStamp ( FileNames[i] );
LEADDlgImage1->ItemDescription [i]= IntToStr(i);
LEADDlgImage1->ItemFileName [i]= FileNames[i];
LEADDlgImage1->ItemBitmap [i]= LEADImage2->Bitmap;
}
LEADDlgImage1->BitmapIndex = 1;
LEADDlgImage1->DlgFlags = DLG_ADDFRAME_AUTOPROCESS |
DLG_ADDFRAME_SHOW_PREVIEW |
DLG_ADDFRAME_SHOW_TOOL_ZOOMLEVEL |
DLG_ADDFRAME_SHOW_TOOL_SHOWEFFECT |
DLG_ADDFRAME_SHOW_TOOL_ONSCREEN |
DLG_ADDFRAME_SHOW_TOOL_RESET;
LEADDlgImage1->LEADImage = LEADImage1;
nRet= LEADDlgImage1->ShowAddFrameDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
LEADImage1->AddFrame ( LEADDlgImage1->SelectedBitmap,
LEADDlgImage1->KeepFrameState,
LEADDlgImage1->UseMask,
LEADDlgImage1->MaskColor,
LEADDlgImage1->SmoothEdge,
LEADDlgImage1->Location,
LEADDlgImage1->Quality );
}
}