AnnHitTest example for Visual C++ 4.0
long hObj;
if(m_Lead1.AnnHitTest (m_Lead1.GetAnnContainer (), 100, 100, &hObj) == ANNHIT_BODY)
{
m_Lead1.AnnSetName (hObj, TRUE, "AnnHitFound", FALSE);
if(m_Lead1.AnnGetType (hObj) == ANNOBJECT_TEXT)
{
m_Lead1.AnnSetFontBold (hObj, !m_Lead1.AnnGetFontBold (hObj), FALSE);
m_Lead1.AnnSetFontItalic (hObj, !m_Lead1.AnnGetFontItalic (hObj), FALSE);
m_Lead1.AnnSetFontStrikeThrough (hObj, !m_Lead1.AnnGetFontStrikeThrough (hObj), FALSE);
m_Lead1.AnnSetFontUnderline (hObj, !m_Lead1.AnnGetFontUnderline (hObj), FALSE);
m_Lead1.AnnSetFontName (hObj, m_Lead1.AnnGetFontName (hObj), FALSE);
m_Lead1.AnnSetFontSize (hObj, ((int)m_Lead1.AnnGetFontSize (hObj)-9) %10 +10, FALSE);
BOOL bShow;
m_Lead1.AnnSetText (hObj, m_Lead1.AnnGetText (hObj) + m_Lead1.AnnGetName (hObj, &bShow), FALSE);
}
}