ShowEffectDlg Example for C++ 5.0 and later

void CDialogs::OnShowEffectDlg() 
{
   int nRet; 

   m_pRasterEfxDlg->Effect->EffectStyle= EFX_EFFECT_BLIND_CLASS; 
   m_pRasterEfxDlg->Effect->Grain= 5; 
   m_pRasterEfxDlg->Effect->Delay= 50; 
   m_pRasterEfxDlg->Effect->MaxPass= 1; 
   m_pRasterEfxDlg->Effect->Transparent= false; 
   m_pRasterEfxDlg->Effect->TransparentColor= RGB(0,0,0); 
   m_pRasterEfxDlg->Effect->WandThickness= 3; 
   m_pRasterEfxDlg->Effect->WandColor= RGB ( 255, 0, 0 ); 
   m_pRasterEfxDlg->UIFlags= EFFECT_SHOW_PREVIEW     |
                             EFFECT_DELAY            |
                             EFFECT_GRAIN            |
                             EFFECT_PASSES           |
                             EFFECT_TRANSPARENT      |
                             EFFECT_WAND             |
                             EFFECT_CLASS_WIPE       |
                             EFFECT_CLASS_WIPERECT   |
                             EFFECT_CLASS_WIPECIRCLE |
                             EFFECT_CLASS_PUSH       |
                             EFFECT_CLASS_SLIDE      |
                             EFFECT_CLASS_ROLL       |
                             EFFECT_CLASS_ROTATE     |
                             EFFECT_CLASS_ZOOM       |
                             EFFECT_CLASS_DRIP       |
                             EFFECT_CLASS_BLIND      |
                             EFFECT_CLASS_RANDOM     |
                             EFFECT_CLASS_CHECK      |
                             EFFECT_CLASS_BLOCKS     |
                             EFFECT_CLASS_CIRCLE     |
                             EFFECT_CLASS_ELLIPSE; 

   m_pRasterEfxDlg->Bitmap= m_LeadRasterView.GetRaster ().GetBitmap ();
   nRet =m_pRasterEfxDlg->ShowEffectDlg ((long)this->m_hWnd); 
   if ( nRet == 0 && m_pRasterEfxDlg->DialogStatus ==DLG_OK ) 
   {
      CString csRes1; 
      CString csRes2; 
      csRes1.Format(TEXT("Effect: %d\nGrain: %d\nDelay: %d\nMaxPass: %d\nTransparent: %d\n"),
                     m_pRasterEfxDlg->Effect->EffectStyle
                     m_pRasterEfxDlg->Effect->Grain
                     m_pRasterEfxDlg->Effect->Delay
                     m_pRasterEfxDlg->Effect->MaxPass
                     m_pRasterEfxDlg->Effect->Transparent); 
      csRes2.Format(TEXT("TransparentColor: %ld\nWandWidth: %d\nWandColor: %ld"),
                     m_pRasterEfxDlg->Effect->TransparentColor
                     m_pRasterEfxDlg->Effect->WandThickness
                     m_pRasterEfxDlg->Effect->WandColor); 
      AfxMessageBox(csRes1 + csRes2); 
   }