AnnAutoDrawEnable Example for C++ 5.0 and later

Note: This topic is for Document/Medical only.

For more information on declaration and unlocking procedures used in testing this example, refer to Annotation Declaration Information.

//This example toggles the AnnAutoDrawEnable property.
void CTutorDlg::OnButtonAnnautodrawenable() 
{   
   CString strMsg;
   short bEnable;

   bEnable = m_pRasterAnn->GetAnnAutoDrawEnable();
   m_pRasterAnn->PutAnnAutoDrawEnable(!bEnable);
   strMsg.Format(TEXT("AnnAutoDrawEnable: %s"), m_pRasterAnn->GetAnnAutoDrawEnable()?  TEXT("TRUE") : TEXT("FALSE")); //VARIANT_TRUE
   AfxMessageBox(strMsg);
}