AnnGetHyperlinkParam example for Delphi
Note: |
This topic is for Document/Medical only. |
//This example retrieves parameters using AnnGetHyperlinkParam.
var
//Global declarations
RasterAnn: LEADRasterAnnotation;
RasterAnnToolbar: LEADRasterAnnToolBar;
hGlobalAnn: Integer;
//Note that hGlobalAnn should be a valid value before clicking Button2.
procedure TForm1.Button1Click(Sender: TObject);
begin
RasterAnn:= CoLEADRasterAnnotation.Create ();
RasterAnnToolbar:= CoLEADRasterAnnToolBar.Create ();
RasterAnn.AnnParentRasterView := LEADRasterView1.Raster;
LEADEventSink1.Connect (RasterAnn, _LEADRasterAnnotationEvents);
RasterAnn.AnnUserMode:= ANN_USERMODE_DESIGN;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
nParam0: Integer;
nParam1: Integer;
nParam2: Integer;
nParam3: Integer;
nParam4: Integer;
begin
RasterAnn.AnnSetHyperlinkMsg (hGlobalAnn, ANN_LINK_ANNEVENT5, 1, 2, 3, 4, 5);
RasterAnn.AnnGetHyperlinkParam (hGlobalAnn, 0);
nParam0:= RasterAnn.AnnHyperlinkParam;
RasterAnn.AnnGetHyperlinkParam (hGlobalAnn, 1);
nParam1:= RasterAnn.AnnHyperlinkParam;
RasterAnn.AnnGetHyperlinkParam (hGlobalAnn, 2);
nParam2:= RasterAnn.AnnHyperlinkParam;
RasterAnn.AnnGetHyperlinkParam (hGlobalAnn, 3);
nParam3:= RasterAnn.AnnHyperlinkParam;
RasterAnn.AnnGetHyperlinkParam (hGlobalAnn, 4);
nParam4:= RasterAnn.AnnHyperlinkParam;
ShowMessage ('HyperlinkParams: ' + IntToStr(nParam0) + ',' + IntToStr(nParam1) + ',' + IntToStr(nParam2) + ',' + IntToStr(nParam3) + ',' + IntToStr(nParam4));
end;