AnnGetAutoMenuItemEnable example for C++ 5.0 and later
For more information on declaration and unlocking procedures used in testing this example, refer to Annotation Declaration Information.
//This example disables the "delete" menu item from the annotation hGlobalAnn.
void CTutorDlg::AnnGetAutoMenuItemEnable(long hGlobalAnn)
{
AnnMenuConstants iEnable;
m_pRasterAnn->AnnSetAutoMenuItemEnable(hGlobalAnn, ANN_OBJECT_CONTAINER, ANN_AUTOTEXT_MENU_DELETE, ANN_MENU_DISABLED, ANN_FLAG_RECURSE + ANN_FLAG_SELECTED, "");
m_pRasterAnn->AnnGetAutoMenuItemEnable(hGlobalAnn, ANN_OBJECT_CONTAINER, ANN_AUTOTEXT_MENU_DELETE);
iEnable = m_pRasterAnn->GetAnnAutoMenuItemEnable();
switch (iEnable)
{
case ANN_MENU_ENABLED:
AfxMessageBox(TEXT("ANN_MENU_ENABLED"));
break;
case ANN_MENU_DISABLED:
AfxMessageBox(TEXT("ANN_MENU_DISABLED"));
break;
case ANN_MENU_DEFAULT:
AfxMessageBox(TEXT("ANN_MENU_DEFAULT"));
break;
}
}