AnnSetAutoMenuItemEnable example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
//disable the Delete menu item from all the selected objects
LEADAnn1->AnnSetAutoMenuItemEnable (LEADAnn1->AnnContainer, 0, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, ANNFLAG_RECURSE + ANNFLAG_SELECTED, "");
//disable the Delete menu item from all the ellipse objects
LEADAnn1->AnnSetAutoMenuItemEnable (LEADAnn1->AnnAutomation, ANNOBJECT_ELLIPSE, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, 0, "");
}