GetOverlayBitmap example for C++ 5.0 and later
int nRet;
int i;
CString strFile;
ILEADRaster *OverlayRaster = NULL;
CoCreateInstance(
CLSID_LEADRaster,
NULL,
CLSCTX_ALL,
IID_ILEADRaster,
(void**)&OverlayRaster
);
for(i = 0; i < 17; i++)
{
nRet = m_pRasterProc->GetOverlayBitmap(m_LeadRasterView.GetRaster(), i, OverlayRaster, OVERLAY_NOCOPY);
if(nRet == 0)
{
strFile.Format("C:\\%d_copy.cmp",i);
nRet = m_pRasterIO->Save(OverlayRaster,(LPTSTR)strFile.AllocSysString(), FILE_LEAD1BIT, 1, QFACTOR_LEAD_0,0);
if(nRet != 0)
AfxMessageBox("Error saving file!", MB_OK);
}
}
OverlayRaster->Release();