Annotation Colors Example for Visual C++
OLE_COLOR cr;
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
pRasterIO->Load (m_RasterView2.GetRaster, "C:\\TEMP\\flagsel.bmp", 0, 1, 1);
m_pRasterAnn->AnnSetBitmap (hStamp, m_RasterView2.GetRaster(), FALSE);
m_pRasterAnn->AnnSetAutoBackColor (m_pRasterAnn->GetAnnAutomation (), ANN_OBJECT_ALL, RGB(40, 80, 160));
cr = m_pRasterAnn->AnnGetAutoBackColor (m_pRasterAnn->GetAnnAutomation (), ANN_OBJECT_POLYGON);
CString text;
text.Format(TEXT("AutoBackColor: %X"), cr);
AfxMessageBox(text);
if(!m_pRasterAnn->AnnGetTransparent (hStamp))
m_pRasterAnn->AnnSetTransparent (hStamp, TRUE, FALSE);
m_pRasterAnn->AnnSetTransparentColor (hStamp, RGB(0, 255, 0), FALSE);
cr = m_pRasterAnn->AnnGetTransparentColor (hStamp);
text.Format(TEXT("TransparentColor: %X"), cr);
AfxMessageBox(text);
m_pRasterAnn->AnnSetBackColor (hPlgn, RGB(100, 20, 200), FALSE);
cr = m_pRasterAnn->AnnGetBackColor (hPlgn);
text.Format(TEXT("BackColor: %X"), cr);
AfxMessageBox(text);
m_pRasterAnn->AnnSetForeColor (hPlgn, RGB(180, 220, 120), FALSE);
cr = m_pRasterAnn->AnnGetForeColor (hPlgn);
text.Format(TEXT("ForeColor: %X"), cr);
AfxMessageBox(text);
m_pRasterAnn->AnnGetBitmap (hStamp, m_RasterView1.GetRaster());