ShowBalanceColorsDlg example for C++ Builder
void __fastcall TForm1::ShowBalanceColorsDlg1Click(TObject *Sender)
{
L_INT nRet;
LEADDlgColor1->DlgFlags = DLG_BALANCECOLORS_SHOW_PREVIEW |
DLG_BALANCECOLORS_SHOW_TOOL_ZOOMLEVEL;
LEADDlgColor1->LEADImage = LEADImage1;
LEADDlgColor1->LEADDlgService = LEADDlgService1;
LEADDlgColor1->EnableMethodErrors = false;
LEADDlgColor1->ShowHelpButton = true;
nRet= LEADDlgColor1->ShowBalanceColorsDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
LEADImage1->BalanceColors ( LEADDlgColor1->BalanceRedFactor,
LEADDlgColor1->BalanceGreenFactor,
LEADDlgColor1->BalanceBlueFactor );
}
}
void __fastcall TForm1::LEADDlgColor1DlgHelp(DWORD uDialogID)
{
switch ( uDialogID )
{
case DLG_HELP_BALANCECOLORS:
ShowMessage( "Help from BalanceColors dialog" );
break;
case DLG_HELP_COLOREDGRAY:
ShowMessage( "Help from ColoredGray dialog" );
break;
case DLG_HELP_GRAYSCALE:
ShowMessage( "Help from GrayScale dialog" );
break;
case DLG_HELP_REMAPINTENSITY:
ShowMessage( "Help from RemapIntensity dialog" );
break;
case DLG_HELP_REMAPHUE:
ShowMessage( "Help from RemapHue dialog" );
break;
case DLG_HELP_CUSTOMIZEPALETTE:
ShowMessage( "Help from CustomizePalette dialog" );
break;
case DLG_HELP_LOCALHISTOEQUALIZE:
ShowMessage( "Help from LocalHistoEqualize dialog" );
break;
case DLG_HELP_INTENSITYDETECT:
ShowMessage( "Help from IntensityDetect dialog" );
break;
case DLG_HELP_SOLARIZE:
ShowMessage( "Help from Solarize dialog" );
break;
case DLG_HELP_POSTERIZE:
ShowMessage( "Help from Posterize dialog" );
break;
case DLG_HELP_BRIGHTNESS:
ShowMessage( "Help from Brightness dialog" );
break;
case DLG_HELP_CONTRAST:
ShowMessage( "Help from Contrast dialog" );
break;
case DLG_HELP_HUE:
ShowMessage( "Help from Hue dialog" );
break;
case DLG_HELP_SATURATION:
ShowMessage( "Help from Saturation dialog" );
break;
case DLG_HELP_GAMMAADJUSTMENT:
ShowMessage( "Help from GammaAdjustment dialog" );
break;
case DLG_HELP_HALFTONE:
ShowMessage( "Help from Halftone dialog" );
break;
case DLG_HELP_COLORRES:
ShowMessage( "Help from ColorRes dialog" );
break;
case DLG_HELP_HISTOCONTRAST:
ShowMessage( "Help from HistoContrast dialog" );
break;
case DLG_HELP_WINDOWLEVEL:
ShowMessage( "Help from WindowLevel dialog" );
break;
case DLG_HELP_COLOR:
ShowMessage( "Help from Color dialog" );
break;
}
}