ShowColoredGrayDlg example for C++ Builder

void __fastcall TForm1::ShowColoredGrayDlg1Click(TObject *Sender) 
{
   L_INT nRet; 

   LEADDlgColor1->RedFactor = 400; 
   LEADDlgColor1->GreenFactor = 300; 
   LEADDlgColor1->BlueFactor = 300; 
   LEADDlgColor1->RedGrayFactor = 400; 
   LEADDlgColor1->GreenGrayFactor = 300; 
   LEADDlgColor1->BlueGrayFactor = 300; 

   LEADDlgColor1->DlgFlags = DLG_COLOREDGRAY_SHOW_PREVIEW |
                            DLG_COLOREDGRAY_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgColor1->LEADImage = LEADImage1; 
   LEADDlgColor1->LEADDlgService = LEADDlgService1; 
   LEADDlgColor1->ShowColoredGrayDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      Edit1->Text= IntToStr ( LEADDlgColor1->RedFactor ); 
      Edit2->Text= IntToStr ( LEADDlgColor1->GreenFactor ); 
      Edit3->Text= IntToStr ( LEADDlgColor1->BlueFactor ); 
      Edit4->Text= IntToStr ( LEADDlgColor1->RedGrayFactor ); 
      Edit5->Text= IntToStr ( LEADDlgColor1->GreenGrayFactor ); 
      Edit6->Text= IntToStr ( LEADDlgColor1->BlueGrayFactor ); 
   }
}