|
-
April 8th, 1999, 01:18 PM
#1
HELP Overriding URL resolution (data access) in WebBrowser Control
Folks,
The WebBrowser AX object includes a method called "Navigate2". Unfortunately, Navigate2 takes either a resource or URL as an argument. I have a need to use the web browser control to retrieve data from a data source not defined by an URL or a resource. I want to override the portion of the AX object which translates an URL (http://www.news.com) into a buffer and buffer length. In effect, i want the address MYSOURCE://0/0/0 when passed into Navigate2 method to retrieve HTML pages from a user defined source (ie I want to define a new URL data source).
I believe there must be another COM object located within the web browser control. This COM object is responsible for resolving the URL addresses. Unfortunately, I don't how to identify this COM object, or it's particular interfaces. Also, once I have found this object, I don't know how to override it with my own resolution interface.
Is there any extensibility located within the web browser control that would allow this functionality?
A good example of what I want to do is shown in the MSDN 6.0 release. Instead of accessing HTML pages directly, they have (somehow) overridden the URL resolution to resolve MK: to indicate reading a compiled HTML file (*.chm).
If that doesn't work, are there any other methods to achieve this same result?
What I have tried so far is to sink the event BeforeNavigate2 into a function OnBeforeNavigate2 which provides equivalent functionality to what is described above. I indicate a CANCEL, retrieve the proper HTML data from my data source, copy it to the HD c:\temp\temp.htm, and then issue a Navigate method to c:\temp\temp.htm.
While this works, its a) a BIG hack and more importantly b) when a frame window is viewed, its children frames are not sinked to my BeforeNavigate event override. For this reason, any data in frames is not properly displayed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|