DWF Viewer (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bug in OnExecuteURL event handling ?

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
257 Views, 2 Replies

bug in OnExecuteURL event handling ?

I use Express Viewer build 3.1.0.78 in a C# application through its COM
interfaces.
All is functioning quit well, except that I can register my own OnExecuteURL
event
handler, that is called fine, when I click on an URL in the Express Viewer,
but I can't stop Express Viewer opening the internet explorer and try to
execute the URL also.
The documentation says:
Setting the eventHandled parameter to a value other than 0 informs the
control that another application wishes to override the default behavior.

I have done this, but the internet explorer is opened always and it can't
interpret my special application specific URL 😉

BUG or fault of me or feature ? Any ideas ?

code sample:
Initialization:
axCAdViewer1.SourcePath ="C:\\Dokumente und Einstellungen\\wagnerma\\Eigene
Dateien\\Projekte\\VABP\\daten\\dwf\\A560-01.dwf";

AdPageView.CAdPageViewer iPageViewer =
(AdPageView.CAdPageViewer)axCAdViewer1.Viewer;

iPageViewer.OnExecuteURL += new
AdPageView._IAdPageViewerEvents_OnExecuteURLEventHandler(OnExecuteURL);

Eventhandler:

private void OnExecuteURL(string url,ref object eventHandled)

{

System.Console.Out.WriteLine("url:"+url);

eventHandled = 1;

}

Thanks for your help.

Best regards,

Marcel Wagner
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Looks like a doc error. Down in the internals, our "handled" flags are
looking for VARIANT_TRUE to determined whether or not the event is handled.
I believe VARIANT_TRUE is defined as -1, so if you set your handled flag
to -1, it should work fine.

Hope that helps.

"Marcel Wagner" wrote in message
news:50B4167210E15FBF443C0ECE2B50A506@in.WebX.maYIadrTaRb...
> I use Express Viewer build 3.1.0.78 in a C# application through its COM
> interfaces.
> All is functioning quit well, except that I can register my own
OnExecuteURL
> event
> handler, that is called fine, when I click on an URL in the Express
Viewer,
> but I can't stop Express Viewer opening the internet explorer and try to
> execute the URL also.
> The documentation says:
> Setting the eventHandled parameter to a value other than 0 informs the
> control that another application wishes to override the default behavior.
>
> I have done this, but the internet explorer is opened always and it can't
> interpret my special application specific URL 😉
>
> BUG or fault of me or feature ? Any ideas ?
>
> code sample:
> Initialization:
> axCAdViewer1.SourcePath ="C:\\Dokumente und
Einstellungen\\wagnerma\\Eigene
> Dateien\\Projekte\\VABP\\daten\\dwf\\A560-01.dwf";
>
> AdPageView.CAdPageViewer iPageViewer =
> (AdPageView.CAdPageViewer)axCAdViewer1.Viewer;
>
> iPageViewer.OnExecuteURL += new
> AdPageView._IAdPageViewerEvents_OnExecuteURLEventHandler(OnExecuteURL);
>
> Eventhandler:
>
> private void OnExecuteURL(string url,ref object eventHandled)
>
> {
>
> System.Console.Out.WriteLine("url:"+url);
>
> eventHandled = 1;
>
> }
>
> Thanks for your help.
>
> Best regards,
>
> Marcel Wagner
>
>
Message 3 of 3
Anonymous
in reply to: Anonymous

yep, doc error, -1 works like advertised 😉
check also the doc of the other events. they prefer a return value greater
0, but I think
-1 is also the only correct value.
Thanks for your help.
Marcel

"Jeffrey Klug (Autodesk)" schrieb im
Newsbeitrag news:2D6D313FCAE62A499BFDCD48BC3A570C@in.WebX.maYIadrTaRb...
> Looks like a doc error. Down in the internals, our "handled" flags are
> looking for VARIANT_TRUE to determined whether or not the event is
handled.
> I believe VARIANT_TRUE is defined as -1, so if you set your handled flag
> to -1, it should work fine.
>
> Hope that helps.
>
> "Marcel Wagner" wrote in message
> news:50B4167210E15FBF443C0ECE2B50A506@in.WebX.maYIadrTaRb...
> > I use Express Viewer build 3.1.0.78 in a C# application through its COM
> > interfaces.
> > All is functioning quit well, except that I can register my own
> OnExecuteURL
> > event
> > handler, that is called fine, when I click on an URL in the Express
> Viewer,
> > but I can't stop Express Viewer opening the internet explorer and try to
> > execute the URL also.
> > The documentation says:
> > Setting the eventHandled parameter to a value other than 0 informs the
> > control that another application wishes to override the default
behavior.
> >
> > I have done this, but the internet explorer is opened always and it
can't
> > interpret my special application specific URL 😉
> >
> > BUG or fault of me or feature ? Any ideas ?
> >
> > code sample:
> > Initialization:
> > axCAdViewer1.SourcePath ="C:\\Dokumente und
> Einstellungen\\wagnerma\\Eigene
> > Dateien\\Projekte\\VABP\\daten\\dwf\\A560-01.dwf";
> >
> > AdPageView.CAdPageViewer iPageViewer =
> > (AdPageView.CAdPageViewer)axCAdViewer1.Viewer;
> >
> > iPageViewer.OnExecuteURL += new
> > AdPageView._IAdPageViewerEvents_OnExecuteURLEventHandler(OnExecuteURL);
> >
> > Eventhandler:
> >
> > private void OnExecuteURL(string url,ref object eventHandled)
> >
> > {
> >
> > System.Console.Out.WriteLine("url:"+url);
> >
> > eventHandled = 1;
> >
> > }
> >
> > Thanks for your help.
> >
> > Best regards,
> >
> > Marcel Wagner
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report