ShowRemapIntensityDlg Example for C++ 5.0 and later

void CDialogs::OnShowRemapIntensityDlg() 
{
   int nRet;
   m_pRasterColorDlg->PutChannel(CHANNEL_RED);
   m_pRasterColorDlg->UIFlags = REMAPINTENSITY_SHOW_PREVIEW |
                           REMAPINTENSITY_SHOW_TOOL_ZOOMLEVEL;

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

   if ( nRet == 0 && m_pRasterColorDlg->DialogStatus == DLG_OK )
   {
      m_pRasterProc->RemapTableSize = m_pRasterColorDlg->RemapTableSize;

      for ( int i= 0; i < m_pRasterColorDlg->RemapTableSize ; i ++)
      {
         m_pRasterProc->PutRemapTable(i,m_pRasterColorDlg->GetRemapTable (i));
      }
      m_pRasterProc->RemapIntensity (m_LeadRasterView.GetRaster (),m_pRasterColorDlg->GetChannel());
   }
}