ShowStitchDlg Example for C++ 5.0 and later
void CDialogs::OnShowStitchDlg()
{
CPictureHolder PicHolder;
int nRet;
ILEADRaster * Raster = NULL;
CoCreateInstance(
CLSID_LEADRaster,
NULL,
CLSCTX_ALL,
IID_ILEADRaster,
(void**)&Raster
);
m_pRasterImageEfxDlg->ItemsCount = 3;
m_pRasterImageEfxDlg->PutItemFileName (0,"C:\\image1.cmp ");
m_pRasterImageEfxDlg->PutItemFileName(1," image2.cmp ");
m_pRasterImageEfxDlg->PutItemFileName(2," image3.cmp ");
for ( int i= 0; i < 3; i ++ )
{
m_pRasterIO->Load (Raster,m_pRasterImageEfxDlg->GetItemFileName (i),0,0,1);
m_pRasterImageEfxDlg->PutItemDescription (i,"C:\\1.cmp");
m_pRasterImageEfxDlg->PutItemBitmap (i,Raster->Bitmap);
}
m_pRasterImageEfxDlg->StitchBitmapWidth= 320;
m_pRasterImageEfxDlg->StitchBitmapHeight = 200;
m_pRasterImageEfxDlg->StitchBitsPerPixel= 24;
m_pRasterImageEfxDlg->StitchResolution= 72;
m_pRasterImageEfxDlg->PutStitchBackGroundColor(RGB ( 255, 255, 255 ));
PicHolder.CreateFromIcon(IDI_STITCH);
m_pRasterImageEfxDlg->PutWindowIcon(PicHolder.GetPictureDispatch());
nRet= m_pRasterImageEfxDlg->ShowStitchDlg( (long)this->m_hWnd);
if ( nRet == DLG_EXPORTANDEXIT )
{
m_LeadRasterView.GetRaster ().SetBitmap (m_pRasterImageEfxDlg->StitchBitmap);
}
Raster->Release();
}