ShowGammaAdjustmentDlg example for C++ Builder

void __fastcall TForm1::ShowGammaAdjustmentDlg1Click(TObject *Sender) 
{
   L_INT nRet; 
   LEADDlgColor1->GammaRedValue = 50; 
   LEADDlgColor1->GammaGreenValue = 50; 
   LEADDlgColor1->GammaBlueValue = 50; 
   LEADDlgColor1->GammaAllChannels = true; 
   LEADDlgColor1->DlgFlags = DLG_GAMMAADJUSTMENT_SHOW_PREVIEW |
                           DLG_GAMMAADJUSTMENT_SHOW_TOOL_ZOOMLEVEL; 
   LEADDlgColor1->LEADImage = LEADImage1; 
   LEADDlgColor1->LEADDlgService = LEADDlgService1; 
   LEADDlgColor1->ShowGammaAdjustmentDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      LEADImage1->GammaCorrect ( LEADDlgColor1->GammaRedValue ); 
   }
}