AnnUnlock 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.
//This is also the example for AnnGetLocked method.
//If an object is found to be locked, using AnnGetLocked method, the object is unlocked, by AnnUnlock, using the key "abcd".
//m_hGlobalAnn is a global handle to an annotation object
void CTutorDlg::OnButtonAnnunlock()
{
VARIANT_BOOL bLocked;
m_pRasterAnn->AnnGetLocked(m_hGlobalAnn);
bLocked = m_pRasterAnn->GetAnnLocked();
if (bLocked = VARIANT_TRUE)
m_pRasterAnn->AnnUnlock(m_hGlobalAnn, "abcd");
}