AnnAutomation Property Example for C++ 4.0 and later
Note: This topic is for Document/Medical only.
This example shows how you can use the AnnAutomation property to access the automation object through DLL functions.
#include "l_bitmap.h" /* LEADTOOLS DLL header files */
void CTutorDlg::OnButton1()
{
L_BOOL IsBold; /* Is the object’s text bold */
OLE_HANDLE hAnnObject;
hAnnObject = m_Lead1.GetAnnAutomation();
/* Set the default font to bold, unless it already is */
L_AnnGetFontBold((HANNOBJECT)hAnnObject, &IsBold);
if (IsBold == TRUE)
MessageBox ("Already bold", "Notice", MB_OK);
else
L_AnnSetFontBold((HANNOBJECT)hAnnObject, TRUE, 0);
}