AnnHitTest example for Visual Basic
If LEAD1.AnnHitTest (LEAD1.AnnContainer, 100, 100, hObj) = ANNHIT_BODY Then
LEAD1.AnnSetName hObj, True, "AnnHitFound", False
If LEAD1.AnnGetType (hObj) = ANNOBJECT_TEXT Then
CommonDialog1.FontBold = LEAD1.AnnGetFontBold (hObj)
CommonDialog1.FontItalic = LEAD1.AnnGetFontItalic (hObj)
CommonDialog1.FontStrikethru = LEAD1.AnnGetFontStrikeThrough(hObj)
CommonDialog1.FontUnderline = LEAD1.AnnGetFontUnderline (hObj)
CommonDialog1.FontName = LEAD1.AnnGetFontName (hObj)
CommonDialog1.FontSize = LEAD1.AnnGetFontSize (hObj)
CommonDialog1.Flags = cdlCFBoth
CommonDialog1.ShowFont
LEAD1.AnnSetFontBold hObj, CommonDialog1.FontBold, False
LEAD1.AnnSetFontItalic hObj, CommonDialog1.FontItalic, False
LEAD1.AnnSetFontStrikeThrough hObj, CommonDialog1.FontStrikethru, False
LEAD1.AnnSetFontUnderline hObj, CommonDialog1.FontUnderline, False
LEAD1.AnnSetFontName hObj, CommonDialog1.FontName, False
LEAD1.AnnSetFontSize hObj, CommonDialog1.FontSize, False
Dim bShow As Boolean
LEAD1.AnnSetText hObj, LEAD1.AnnGetText (hObj) + LEAD1.AnnGetName (hObj, bShow), False
End If
End If