ShowErosionFilterDlg Example for C++ 5.0 and later

void CDialogs::OnShowErosionFilterDlg()
{
   int nRet = 0; 

   m_pRasterImageEfxDlg->Bitmap = m_LeadRasterView.GetRaster ().GetBitmap ();
   m_pRasterImageEfxDlg->UIFlags = EROSIONFILTER_SHOW_PREVIEW |
                                   EROSIONFILTER_SHOW_TOOL_ZOOMLEVEL; 

   nRet = m_pRasterImageEfxDlg->ShowErosionFilterDlg((long)this->m_hWnd); 

   if (nRet == 0 && m_pRasterImageEfxDlg->DialogStatus == DLG_OK) 
   {
      nRet = m_pRasterProc->BinaryFilter (m_LeadRasterView.GetRaster (),
                                     m_pRasterImageEfxDlg->GetBinaryFilterType()
                                      ); 
   }