ShowGetGradientDlg example for C++ Builder

void __fastcall TForm1::ShowGetGradientDlg1Click(TObject *Sender) 
{
   L_INT nRet; 
   LEADDlgEffect1->StartColor = RGB ( 0, 0, 255 ); 
   LEADDlgEffect1->EndColor = RGB ( 255, 0, 0 ); 
   LEADDlgEffect1->GradientStyle= EFX_GRADIENT_ANGLE_TO_RT; 
   LEADDlgEffect1->GradientSteps = 200; 
   LEADDlgEffect1->DlgFlags = DLG_GRADIENT_SHOW_PREVIEW          |
                           DLG_GRADIENT_AUTOPREVIEW           |
                           DLG_GRADIENT_STARTCOLOR            |
                           DLG_GRADIENT_ENDCOLOR              |
                           DLG_GRADIENT_STEPS                 |
                           DLG_GRADIENT_NO_TREEVIEW           |
                           DLG_GRADIENT_CLASS_LINEAR          |
                           DLG_GRADIENT_CLASS_ANGULAR         |
                           DLG_GRADIENT_CLASS_RECTANGULAR     |
                           DLG_GRADIENT_CLASS_ELLIPTICAL      |
                           DLG_GRADIENT_CLASS_CONICAL; 

   LEADDlgEffect1->LEADImage = LEADImage1; 
   LEADDlgEffect1->LEADDlgService = LEADDlgService1; 

   nRet= LEADDlgEffect1->ShowGetGradientDlg ( this ); 

   if ( nRet == SUCCESS_DLG_OK ) 
   {
      /*output the results*/
      Edit1->Text= IntToStr ( LEADDlgEffect1->GradientStyle );      Edit2->Text= IntToStr ( LEADDlgEffect1->GradientSteps );      Shape1->Brush->Color= (TColor)LEADDlgEffect1->StartColor;      Shape2->Brush->Color= (TColor)LEADDlgEffect1->EndColor;   }
}