AddWeightedBitmaps example for C++ 5 and later

int iListCount = 4;

ILEADRaster* m_pRaster= NULL;
CoCreateInstance(CLSID_LEADRaster, NULL, CLSCTX_ALL, IID_ILEADRaster, (void**)&m_pRaster);

ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);

m_pRasterProc->FactorCount = iListCount;

for (int i = 0; i<iListCount- 1;++i)
{
      m_pRaster->Bitmap = m_LeadRasterView.GetRaster ().GetBitmap();
      m_pRasterProc->Rotate (m_pRaster, 360 * i, ROTATE_RESIZE, RGB(255, 0, 0));
      m_LeadRasterView.GetRaster().InsertBitmapListItem (-1, m_pRaster->Bitmap);
      m_pRasterProc->PutFactor(i,100);
}
 
m_pRasterProc->AddWeightedBitmaps( m_LeadRasterView.GetRaster(), BC_ADDWEIGHTED);

m_pRasterProc->Release();
m_pRaster->Release();