ShowColoredGrayDlg example for Delphi
procedure TForm1.ShowColoredGrayDlg1Click(Sender: TObject);
var
nRet: L_INT;
begin
LEADDlgColor1.RedFactor:= 400;
LEADDlgColor1.GreenFactor:= 300;
LEADDlgColor1.BlueFactor:= 300;
LEADDlgColor1.RedGrayFactor:= 400;
LEADDlgColor1.GreenGrayFactor:= 300;
LEADDlgColor1.BlueGrayFactor:= 300;
LEADDlgColor1.DlgFlags:= DLG_COLOREDGRAY_SHOW_PREVIEW Or
DLG_COLOREDGRAY_SHOW_TOOL_ZOOMLEVEL;
LEADDlgColor1.LEADImage:= LEADImage1;
LEADDlgColor1.LEADDlgService:= LEADDlgService1;
nRet:= LEADDlgColor1.ShowColoredGrayDlg ( Self );
if ( nRet = SUCCESS_DLG_OK ) then
begin
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 );
end;
end;