AnnGetHyperlinkString example for C++ 4.0 and later
Note: This topic is for Document/Medical only.
The following example places calls to both the AnnSetHyperlinkString method and the AnnGetHyperlinkString method.
void CTestocxDlg::OnAnnHyperlinkMenu Leadctrl1(const VARIANT FAR& aObjects, short uCount)
{
long x;
CString linkstr;
int hObject;
// Set AnnHyperLink to a URL
for( x=0; x<uCount; x++)
{
SafeArrayGetElement(aObjects.parray, &x, &hObject);
m_Lead1.AnnSetHyperlinkString(hObject, ANNLINK_WEBPAGE, "http://www.leadtools.com");
// get the string to see what got set
linkstr = m_Lead1.AnnGetHyperlinkString(hObject);
AfxMessageBox(linkstr);
}
}