AnnGetHyperlinkString 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 examples assumes that hGlobalAnn is a handle to a button annotation.
//A hyperlink string is set and retrieved
//m_hGlobalAnn is the handle to a button annotation
void CTutorDlg::OnButtonAnngethyperlinkstring()
{
BSTR bstrHyperlink;
CString strHyperLink;
m_pRasterAnn->AnnSetHyperlinkString(m_hGlobalAnn, ANN_LINK_WEBPAGE, "http://www.leadtools.com");
m_pRasterAnn->AnnGetHyperlinkString(m_hGlobalAnn);
bstrHyperlink = m_pRasterAnn->GetAnnHyperlinkString();
strHyperLink = bstrHyperlink;
::SysFreeString(bstrHyperlink);
AfxMessageBox(strHyperLink);
}