ShowBalanceColorsDlg example for Delphi
procedure TForm1.ShowBalanceColorsDlg1Click(Sender: TObject);
var
nRet: L_INT;
begin
LEADDlgColor1.ZoomToFit:= False;
LEADDlgColor1.DlgFlags:= DLG_BALANCECOLORS_SHOW_PREVIEW Or
DLG_BALANCECOLORS_SHOW_TOOL_ZOOMLEVEL;
LEADDlgColor1.LEADImage:= LEADImage1;
LEADDlgColor1.LEADDlgService:= LEADDlgService1;
LEADDlgColor1.EnableMethodErrors:= False;
LEADDlgColor1.ShowHelpButton:= True;
nRet:= LEADDlgColor1.ShowBalanceColorsDlg ( Self );
if ( nRet = SUCCESS_DLG_OK ) then
begin
LEADImage1.BalanceColors ( LEADDlgColor1.BalanceRedFactor,
LEADDlgColor1.BalanceGreenFactor,
LEADDlgColor1.BalanceBlueFactor );
end;
end;
procedure TForm1.LEADDlgColor1DlgHelp (uDialogID: Cardinal);
begin
case ( uDialogID ) of
DLG_HELP_BALANCECOLORS:
ShowMessage( 'Help from BalanceColors dialog' );
DLG_HELP_COLOREDGRAY:
ShowMessage( 'Help from ColoredGray dialog' );
DLG_HELP_GRAYSCALE:
ShowMessage( 'Help from GrayScale dialog' );
DLG_HELP_REMAPINTENSITY:
ShowMessage( 'Help from RemapIntensity dialog' );
DLG_HELP_REMAPHUE:
ShowMessage( 'Help from RemapHue dialog' );
DLG_HELP_CUSTOMIZEPALETTE:
ShowMessage( 'Help from CustomizePalette dialog' );
DLG_HELP_LOCALHISTOEQUALIZE:
ShowMessage( 'Help from LocalHistoEqualize dialog' );
DLG_HELP_INTENSITYDETECT:
ShowMessage( 'Help from IntensityDetect dialog' );
DLG_HELP_SOLARIZE:
ShowMessage( 'Help from Solarize dialog' );
DLG_HELP_POSTERIZE:
ShowMessage( 'Help from Posterize dialog' );
DLG_HELP_BRIGHTNESS:
ShowMessage( 'Help from Brightness dialog' );
DLG_HELP_CONTRAST:
ShowMessage( 'Help from Contrast dialog' );
DLG_HELP_HUE:
ShowMessage( 'Help from Hue dialog' );
DLG_HELP_SATURATION:
ShowMessage( 'Help from Saturation dialog' );
DLG_HELP_GAMMAADJUSTMENT:
ShowMessage( 'Help from GammaAdjustment dialog' );
DLG_HELP_HALFTONE:
ShowMessage( 'Help from Halftone dialog' );
DLG_HELP_COLORRES:
ShowMessage( 'Help from ColorRes dialog' );
DLG_HELP_HISTOCONTRAST:
ShowMessage( 'Help from HistoContrast dialog' );
DLG_HELP_WINDOWLEVEL:
ShowMessage( 'Help from WindowLevel dialog' );
DLG_HELP_COLOR:
ShowMessage( 'Help from Color dialog' );
end;
end;