AnnGetHyperlinkType example for Visual J++
Note: This topic is for Document/Medical only.
The following is an example of AnnHyperlink event code which includes a call to AnnGetHyperlinkType.
private void LEAD1_annHyperlink(Object source, LTOCXU.LEAD.AnnHyperlinkEvent e)
{
short sType = LEAD1.AnnGetHyperlinkType( e.hObject );
String strMsg = new String();
if( sType == LTOCXU.AnnHyperlinkTypeConstants.ANNLINK_ANNEVENT5 || sType ==LTOCXU.AnnHyperlinkTypeConstants.ANNLINK_ANNEVENT )
{
if( e.iParamCount >=0 ) strMsg = e.iParamCount + " params are valid\n";
if( e.iParamCount >= 1 ) strMsg += "Param1: " + e.lParam1 + "\n";
if( e.iParamCount >= 2 ) strMsg += "Param2: " + e.lParam2 + "\n";
if( e.iParamCount >= 3 ) strMsg += "Param3: " + e.lParam3 + "\n";
if( e.iParamCount >= 4 ) strMsg += "Param4: " + e.lParam4 + "\n";
if( e.iParamCount == 5 ) strMsg += "Param5: " + e.lParam5 + "\n";
}
else
strMsg = "Invalid Type";
MessageBox.show( strMsg );
}