Annotation Colors example for Visual C++ 4.0 and later
OLE_COLOR cr;
long hStamp , hPlgn;
m_Lead2.Load ("C:\\TEMP\\flagsel.bmp", 0, 1, 1);
m_Lead1.AnnSetBitmap (hStamp, m_Lead2.GetBitmap (), FALSE);
m_Lead1.AnnSetAutoBackColor (m_Lead1.GetAnnAutomation (), ANNOBJECT_ALL, RGB(40, 80, 160));
cr = m_Lead1.AnnGetAutoBackColor (m_Lead1.GetAnnAutomation(), ANNOBJECT_POLYGON);
CString text;
text.Format("AutoBackColor: %X", cr);
AfxMessageBox(text);
if(! m_Lead1.AnnGetTransparent (hStamp))
m_Lead1.AnnSetTransparent (hStamp, TRUE, FALSE);
m_Lead1.AnnSetTransparentColor (hStamp, RGB(0, 255, 0), FALSE);
cr = m_Lead1.AnnGetTransparentColor (hStamp);
text.Format("TransparentColor: %X", cr);
AfxMessageBox(text);
m_Lead1.AnnSetBackColor (hPlgn, RGB(100, 20, 200), FALSE);
cr = m_Lead1.AnnGetBackColor (hPlgn);
text.Format("BackColor: %X", cr);
AfxMessageBox(text);
m_Lead1.AnnSetForeColor (hPlgn, RGB(180, 220, 120), FALSE);
cr = m_Lead1.AnnGetForeColor (hPlgn);
text.Format("ForeColor: %X", cr);
AfxMessageBox(text);
m_Lead1.SetBitmap (m_Lead1.AnnGetBitmap (hStamp));