I get the ActiveX imported and I can run it inside the app.
Since I have not much knowledge about COM automation,
I got puzzeld when it come to the interface for events:
- Code: Select all
procedure TForm1.CExpressViewerControl1SelectObject(ASender: TObject; const pIAdPageObjectNode, pHandled: IDispatch);
begin
Label1.Caption := ????;
end;
The autodesk doc has only a VB6 example:
- Code: Select all
Private Sub CExpressViewerControl1_OnSelectObject(ByVal pIAdPageObjectNode As Object, ByVal pHandled As Object)
Dim strResult As String
Dim objPageObjectNode As EPlotRenderer.IAdPageObjectNode
Dim tHandled As AdCommon.CAdToggle
'First parameter : piAdPageObjectNode
Set objPageObjectNode = pIAdPageObjectNode
strResult = "Object node name is " + objPageObjectNode.Name
lstLog.AddItem (strResult)
'Second parameter : pHandled
Set tHandled = pHandled
tHandled.State = True
strResult = "Selected object shouldn't be highlighted (in yellow)"
lstLog.AddItem (strResult)
End Sub
Anyone more knowledge how this is done in delphi?