Halftone example for C++ 5.0 and later

int iDim = 5;
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);

for (int i = 0; i<iDim*iDim+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->HalfTone (m_LeadRasterView.GetRaster(), HALFTONE_USERDEF, 0, 5 );

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