AnnSetUser Example for C++ 5.0 and later

Note: This topic is for Document/Medical only.

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

void CTutorDlg::OnButtonAnnsetuser() 
{
   // hide the selected objects
   OLE_HANDLE hAnnContainer = NULL;
   hAnnContainer = m_pRasterAnn->GetAnnContainer();
   m_pRasterAnn->AnnSetVisible(hAnnContainer, 0, ANN_FLAG_RECURSE | ANN_FLAG_SELECTED, "");

   // set the selected objects to belong to user XXX
   m_pRasterAnn->AnnSetUser(hAnnContainer, "", "xxx", VARIANT_TRUE);
}