AnnGetNameRestrict Example for Visual C++
//This sample toggles the bNameRestrict property of the annotation object hObject
BOOL bNameRestrict;
CString strMsg;
bNameRestrict = m_pRasterAnn->AnnGetNameRestrict (hObject);
bNameRestrict = !bNameRestrict;
if (bNameRestrict)
strMsg = TEXT("Changing NameRestrict property to TRUE");
else
strMsg = TEXT("Changing NameRestrict property to FALSE");
MessageBox(strMsg);
m_pRasterAnn->AnnSetNameRestrict (hObject, bNameRestrict, FALSE);