ShowColorResDlg Example for C++ 5.0 and later

void CDialogs::OnShowColorResDlg()
{
   int nRet; 
   m_pRasterColorDlg->UIFlags = COLORRES_SHOW_BITALL |
                              COLORRES_SHOW_DITHER_ALL |
                              COLORRES_SHOW_PAL_ALL; 

   m_pRasterColorDlg->UIFlags = COLORRES_SHOW_PREVIEW |
                           COLORRES_SHOW_OPENPALFILE |
                           COLORRES_SHOW_ORDER |
                           COLORRES_SHOW_TOOL_ZOOMLEVEL; 

   m_pRasterColorDlg->Bitmap = m_LeadRasterView.GetRaster().GetBitmap ();
   nRet = m_pRasterColorDlg->ShowColorResDlg((long)this->m_hWnd); 

   if ( nRet == 0 && m_pRasterColorDlg->DialogStatus ==DLG_OK ) 
   {
      m_pRasterProc->ColorRes (m_LeadRasterView.GetRaster (),
                              m_pRasterColorDlg->BitsPerBixel, 
                              (ColorResPaletteConstants)m_pRasterColorDlg->PaletteFlags
                              (ColorResDitherConstants)m_pRasterColorDlg->DitherFlags
                              0 ); 
   }
}