ShowPNGWebTunerDlg example for C++ Builder
void __fastcall TForm1::ShowPNGWebTunerDlg1Click(TObject *Sender)
{
L_INT nRet;
LEADDlgWeb1->TransparentColor = RGB ( 255, 255, 255 );
LEADDlgWeb1->PaletteType = CRF_OPTIMIZEDPALETTE;
LEADDlgWeb1->AddWindowsColors = True;
LEADDlgWeb1->DitherType = CRF_FLOYDSTEINDITHERING;
LEADDlgWeb1->BitsPerPixel = 8;
LEADDlgWeb1->NumOfColors = 256;
LEADDlgWeb1->TransparencyTolerance = 25;
LEADDlgWeb1->Transparent = True;
LEADDlgWeb1->DlgFlags = DLG_PNGWEBTUNER_SHOW_INFORMATION |
DLG_PNGWEBTUNER_SHOW_PREVIEW |
DLG_PNGWEBTUNER_SHOW_TOOL_ZOOMLEVEL |
DLG_PNGWEBTUNER_SHOW_TOOL_COLORPICKER |
DLG_PNGWEBTUNER_SHOW_TRANSPARENCY |
DLG_PNGWEBTUNER_SHOW_ADDWINDOWCOLOR;
LEADDlgWeb1->LEADImage = LEADImage1;
LEADDlgWeb1->LEADDlgService = LEADDlgService1;
LEADDlgWeb1->EnableMethodErrors = false;
LEADDlgWeb1->ShowHelpButton = true;
nRet= LEADDlgWeb1->ShowPNGWebTunerDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
LEADImage1->ColorRes ( LEADDlgWeb1->BitsPerPixel,
LEADDlgWeb1->PaletteType,
LEADDlgWeb1->DitherType,
0 );
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LEADDlgWeb1DlgHelp (DWORD uDialogID)
{
switch ( uDialogID )
{
case DLG_HELP_PNGWEBTUNER:
ShowMessage( "Help from PNG Web Tuner dialog" );
break;
case DLG_HELP_GIFWEBTUNER:
ShowMessage( "Help from GIF Web Tuner dialog" );
break;
case DLG_HELP_JPEGWEBTUNER:
ShowMessage( "Help from JPEG Web Tuner dialog" );
break;
case DLG_HELP_HTMLMAPPER:
ShowMessage( "Help from HTMLMapper dialog" );
break;
}
}