How can I initialize an ActiveX control from a URL?

Posted by Peter Ruderman on Stack Overflow See other posts from Stack Overflow or by Peter Ruderman
Published on 2010-05-25T18:51:02Z Indexed on 2010/05/25 19:01 UTC
Read the original article Hit count: 169

Filed under:
|
|

I have an MFC ActiveX control embedded in a web page. Some of the parameters for this control are very large. I don't know what these values will be at compile time, but I do know that once retrieved, they will almost certainly never change.

Currently, I embed the parameters like so:

<object name="MyActiveX">
  <param name="param" value="<%= GetData() %>" />
</object>

I want to do something like this:

<object name="MyActiveX">
  <param name="param" value="content/data" valuetype="ref" />
</object>

The idea is that the browser would retrieve the resource from the web server and pass it on to the control. The browser's own caching would then take care of the unneccesary downloads. Unfortunately, ref parameters don't work like this. The browser just passes the url along to the control (which strikes me as utterly useless, but I digress).

So, is there some way I can make this work? Alternatively, is there an easy way in MFC to instruct the control's host container to retrieve a URI identified resource? Any better ideas?

© Stack Overflow or respective owner

Related posts about mfc

Related posts about activex