ShowAddBitmapsDlg Example for C++ 5.0 and later
void CDialogs::OnShowAddBitmapsDlg()
{
int nRet;
ILEADRaster * Raster = NULL;
CoCreateInstance(
CLSID_LEADRaster,
NULL,
CLSCTX_ALL,
IID_ILEADRaster,
(void**)&Raster
);
m_pRasterImageEfxDlg->ItemsCount = 3;
m_pRasterImageEfxDlg->PutItemFileName (0,"C:\\1.cmp");
m_pRasterImageEfxDlg->PutItemFileName(1,"C:\\1.bmp");
m_pRasterImageEfxDlg->PutItemFileName(2,"C:\\1.jpg");
for (int i= 0; i < m_pRasterImageEfxDlg->ItemsCount; i ++ )
{
m_pRasterIO->Load (Raster,m_pRasterImageEfxDlg->GetItemFileName (i),0,0,1);
m_pRasterImageEfxDlg->PutItemDescription (i,m_pRasterImageEfxDlg->GetItemFileName(i));
m_pRasterImageEfxDlg->PutItemBitmap (i, Raster->GetBitmap ());
}
m_pRasterImageEfxDlg->ImageEffectFlags = UNDERLAY_TILE;
m_pRasterImageEfxDlg->UIFlags = ADDBITMAPS_SHOW_PREVIEW |
ADDBITMAPS_SHOW_TOOL_ZOOMLEVEL;
m_pRasterImageEfxDlg->Bitmap = m_LeadRasterView.GetRaster ().GetBitmap ();
nRet = m_pRasterImageEfxDlg->ShowAddBitmapsDlg((long)this->m_hWnd);
if ( nRet == 0 && m_pRasterImageEfxDlg->DialogStatus ==DLG_OK )
{
if(m_pRasterImageEfxDlg-> SelectedBitmapsCount > 0)
{
Raster->PutBitmapList(m_pRasterImageEfxDlg->SelectedBitmap List);
m_pRasterProc->AddBitmaps(Raster,(AddBitmapsConstants)m_pRasterImageEfxDlg->ImageEffectFlags );
}
}
Raster->Release();
}