ShowAddBorderDlg Example for C++ 5.0 and later

void CDialogs::OnShowAddBorderDlg()

{

   int nRet;

   m_pRasterImageDlg->ItemsCount= 3;

   m_pRasterImageDlg->PutItemFileName(0,"C:\\1.bmp");

   m_pRasterImageDlg->PutItemFileName(1,"C:\\2.bmp");

   m_pRasterImageDlg->PutItemFileName(2,"C:\\3.bmp");

   for (int i= 0; i < m_pRasterImageDlg->ItemsCount; i ++ )

   {

      m_Lead1.Load  (m_pRasterImageDlg->GetItemFileName (i),0,0,1);

      m_pRasterImageDlg->PutItemDescription(i,m_pRasterImageDlg->GetItemFileName(i));

      m_pRasterImageDlg->PutItemBitmap(i, m_Lead1.GetBitmap  ());

   }

   

   m_pRasterImageDlg->PutBitmap(m_Lead1.GetBitmap  ());

   m_pRasterImageDlg->PutUIFlags(ADDBORDER_SHOW_PREVIEW |

                                 ADDBORDER_SHOW_TOOL_ZOOMLEVEL);

   nRet = m_pRasterImageDlg->ShowAddBorderDlg((long)this->m_hWnd);

   if ( nRet == 0 && m_pRasterImageDlg->DialogStatus == DLG_OK )

   {

      m_Lead2.SetBitmap(m_pRasterImageDlg->SelectedBitmap);

      nRet = m_Lead1.AddBorder  (m_pRasterImageDlg->LeftThickness,

                              m_pRasterImageDlg->TopThickness,

                              m_pRasterImageDlg->RightThickness,

                              m_pRasterImageDlg->BottomThickness,

                              (AddBorderLocationConstants)m_pRasterImageDlg->Location,

                              m_pRasterImageDlg->GetBorderStyle(),

                              m_pRasterImageDlg->GetEffectStyle(),

                              m_Lead2.GetBitmap(),

                              m_pRasterImageDlg->GetGradientStyle(),

                              m_pRasterImageDlg->GradientStartColor,

                              m_pRasterImageDlg->GradientEndColor,

                              m_pRasterImageDlg->CurveIntensity,

                              m_pRasterImageDlg->GetEnableSoftCurve(),

                              m_pRasterImageDlg->GetEnableShadow(),

                              m_pRasterImageDlg->ShadowSize,

                              m_pRasterImageDlg->GetShadowDirection(),

                              m_pRasterImageDlg->GetEnableBumpyShadow()

                             );

   }

}