ShowResizeDlg Example for C++ 5.0 and later

void CDialogs::OnShowResizeDlg()
{
   int nRet; 

   m_pRasterImageDlg->MaxNewWidth= 0; 
   m_pRasterImageDlg->MaxNewHeight= 0; 
   m_pRasterImageDlg->MaxNewResolutionX= 0; 
   m_pRasterImageDlg->MaxNewResolutionY= 0; 
   m_pRasterImageDlg->CurrentWidth= m_LeadRasterView.GetRaster().GetBitmapWidth ();
   m_pRasterImageDlg->CurrentHeight= m_LeadRasterView.GetRaster().GetBitmapHeight ();
   m_pRasterImageDlg->CurrentResolutionX= m_LeadRasterView.GetRaster().GetBitmapXRes ();
   m_pRasterImageDlg->CurrentResolutionY= m_LeadRasterView.GetRaster().GetBitmapYRes ();
   m_pRasterImageDlg->BitsPerPixel= m_LeadRasterView.GetRaster().GetBitmapBits();

   m_pRasterImageDlg->UIFlags = RESIZE_SHOW_IDENTICALVALUE |
                              RESIZE_SHOW_MAINTAINASPECT |
                              RESIZE_SHOW_PERCENTAGE; 
   m_pRasterImageDlg->Bitmap =  m_LeadRasterView.GetRaster().GetBitmap ();
   nRet= m_pRasterImageDlg->ShowResizeDlg( (long)this->m_hWnd ); 
   if ( nRet == 0 && m_pRasterImageDlg->DialogStatus == DLG_OK ) 
   {
      m_pRasterProc->Size (m_LeadRasterView.GetRaster (),
                           m_pRasterImageDlg->NewWidth
                           m_pRasterImageDlg->NewHeight
                           m_pRasterImageDlg->GetResizeFlags()
                           ); 
   }
}