DWF viewer COM automation

Please discuss general Delphi programming topics here.

DWF viewer COM automation

Postby HPW » March 27th, 2007, 7:52 pm

I tired to get the DWF-viewer from autodesk to work in delphi.
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);
  Label1.Caption :=  ????;

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?
Posts: 238
Joined: February 25th, 2006, 10:19 am
Location: Germany

Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests