AnnSetHyperlinkMsg Example for C++ 4.0 and later

Note: This topic is for Document/Medical only.

The following is an example of AnnHyperlinkMenu event code, which includes a call to AnnSetHyperlinkMsg.

void CTestocxDlg::OnAnnHyperlinkMenu Leadctrl1(const VARIANT FAR& aObjects, short uCount) 
{
   long x;
   CString linkstr;
   int hObject;

    // set HyperLink to type ANNLINK_ANNEVENT5
    // and set the 5 params to some values.
   for( x=0; x<uCount; x++)
   {
       SafeArrayGetElement(aObjects.parray, &x, &hObject);
       m_Lead1.AnnSetHyperlinkMsg(hObject, ANNLINK_ANNEVENT5, 5, 4, 3, 2, 1);
   }
}