ShowColorResDlg example for C++ Builder
void __fastcall TForm1::ShowColorResDlg1Click(TObject *Sender)
{
L_INT nRet;
LEADDlgColor1->DlgFlagsEx = DLG_COLORRES_SHOW_BITALL |
DLG_COLORRES_SHOW_DITHER_ALL |
DLG_COLORRES_SHOW_PAL_ALL;
LEADDlgColor1->DlgFlags = DLG_COLORRES_SHOW_PREVIEW |
DLG_COLORRES_SHOW_OPENPALFILE |
DLG_COLORRES_SHOW_ORDER |
DLG_COLORRES_SHOW_TOOL_ZOOMLEVEL;
LEADDlgColor1->LEADImage = LEADImage1;
LEADDlgColor1->LEADDlgService = LEADDlgService1;
nRet= LEADDlgColor1->ShowColorResDlg ( this );
if ( nRet == SUCCESS_DLG_OK )
{
LEADImage1->ColorRes ( LEADDlgColor1->BitsPerPixel,
LEADDlgColor1->PaletteFlags,
LEADDlgColor1->DitherFlags,
0 );
}
}