AnnAutoMenuEnable Example for C++ 5.0 and later

Note: This topic is for Document/Medical only.

This example toggles the AnnAutoMenuEnable property.

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

//This example toggles the AnnAutoMenuEnable property
void CTutorDlg::OnButtonAnnautomenuenable() 
{  
   CString strMsg;
   
   VARIANT_BOOL bEnable;;
   bEnable  = m_pRasterAnn->GetAnnAutoMenuEnable();
   m_pRasterAnn->PutAnnAutoMenuEnable(!bEnable);
   bEnable = m_pRasterAnn->GetAnnAutoMenuEnable();
   strMsg.Format(TEXT("AnnAutoMenuEnable is now %s"), bEnable == VARIANT_TRUE ? TEXT("True") : TEXT("False"));
   AfxMessageBox(strMsg);
}