ShowAutoTrimDlg Example for C++ 5.0 and later

void CDialogs::OnShowAutoTrimDlg()
{
   int nRet; 

   m_pRasterImageDlg->UIFlags =  AUTOTRIM_SHOW_PREVIEW; 
   m_pRasterImageDlg->Bitmap =  m_LeadRasterView.GetRaster().GetBitmap ();

   nRet= m_pRasterImageDlg->ShowAutoTrimDlg( (long)this->m_hWnd ); 
   if ( nRet == 0 && m_pRasterImageDlg->DialogStatus == DLG_OK ) 
   {
      m_pRasterProc->AutoTrim (m_LeadRasterView.GetRaster (),m_pRasterImageDlg->Threshold); 
   }
}