ShowAddNoiseDlg Example for C++ 5.0 and later

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

   m_pRasterImageEfxDlg->PutChannel(CHANNEL_MASTER); 
   m_pRasterImageEfxDlg->Bitmap = m_LeadRasterView.GetRaster ().GetBitmap ();
   m_pRasterImageEfxDlg->UIFlags = ADDNOISE_SHOW_PREVIEW |
                                   ADDNOISE_SHOW_TOOL_ZOOMLEVEL; 

   nRet = m_pRasterImageEfxDlg->ShowAddNoiseDlg((long)this->m_hWnd); 
  
   if (nRet == 0 && m_pRasterImageEfxDlg->DialogStatus == DLG_OK) 
   {
      nRet = m_pRasterProc->AddNoise (m_LeadRasterView.GetRaster (),
                                     m_pRasterImageEfxDlg->Range
                                     m_pRasterImageEfxDlg->GetChannel()
                                   ); 
   }
}