AnnRestrictToContainer example for C++ Builder
//This example toggles the "restrict to container" property.
//If an object is restricted to the container, no part of it can be moved outside the container
void TForm1:: ExampleRestrictToContainer (HANNOBJECT hObject )
{
bool bRestrict;
bRestrict = LEADAnn1->AnnRestrictToContainer[hObject];
bRestrict = !bRestrict;
LEADAnn1->AnnRestrictToContainer[hObject] = bRestrict;
if (bRestrict == true)
ShowMessage ("Restricted To Container");
else
ShowMessage ("Not Restricted To the Container");
}