ShowGetEffectDlg example for C++ Builder
void __fastcall TForm1::ShowGetEffectDlg1Click(TObject *Sender)
{
L_INT nRet;
LEADDlgEffect1->Effect = EFX_EFFECT_ROLL4_T_R_T_L;
LEADDlgEffect1->Grain = 5;
LEADDlgEffect1->Delay = 50;
LEADDlgEffect1->MaxPass = 1;
LEADDlgEffect1->Transparent = False;
LEADDlgEffect1->TransparentColor = RGB(0,0,0);
LEADDlgEffect1->WandThickness = 3;
LEADDlgEffect1->WandColor = RGB ( 255, 0, 0 );
LEADDlgEffect1->DlgFlags = DLG_EFFECT_SHOW_PREVIEW |
DLG_EFFECT_DELAY |
DLG_EFFECT_GRAIN |
DLG_EFFECT_PASSES |
DLG_EFFECT_TRANSPARENT |
DLG_EFFECT_WAND |
DLG_EFFECT_CLASS_WIPE |
DLG_EFFECT_CLASS_WIPERECT |
DLG_EFFECT_CLASS_WIPECIRCLE |
DLG_EFFECT_CLASS_PUSH |
DLG_EFFECT_CLASS_SLIDE |
DLG_EFFECT_CLASS_ROLL |
DLG_EFFECT_CLASS_ROTATE |
DLG_EFFECT_CLASS_ZOOM |
DLG_EFFECT_CLASS_DRIP |
DLG_EFFECT_CLASS_BLIND |
DLG_EFFECT_CLASS_RANDOM |
DLG_EFFECT_CLASS_CHECK |
DLG_EFFECT_CLASS_BLOCKS |
DLG_EFFECT_CLASS_CIRCLE |
DLG_EFFECT_CLASS_ELLIPSE;
LEADDlgEffect1->LEADImage = LEADImage1;
LEADDlgEffect1->LEADDlgService = LEADDlgService1;
nRet= LEADDlgEffect1->ShowGetEffectDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
/*output the results*/
Edit1->Text= IntToStr ( LEADDlgEffect1->Effect );
Edit2->Text= IntToStr ( LEADDlgEffect1->Grain );
Edit3->Text= IntToStr ( LEADDlgEffect1->Delay);
Edit4->Text= IntToStr ( LEADDlgEffect1->MaxPass );
if ( LEADDlgEffect1->Transparent )
Edit5->Text= "Transparent True";
else
Edit5->Text= "Transparent False";
Edit6->Text= IntToStr ( LEADDlgEffect1->WandThickness );
Shape1->Brush->Color= (TColor)LEADDlgEffect1->TransparentColor;
Shape2->Brush->Color= (TColor)LEADDlgEffect1->WandColor;
}
}