Re: Best way to approach dynamically generated content from within an application hosting a webbrowser control

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 03/31/04


Date: Wed, 31 Mar 2004 11:30:15 -0500

Here's a way to load a generated content from memory and make MSHTML
believe it came from a particular URL:

http://groups.google.com/groups?threadm=031f01c3780b%24b860f080%24a301280a%40phx.gbl

The POST data is available in BeforeNavigate2.

-- 
With best wishes,
    Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
"Lewis G. Pringle, Jr." <lewis@sophists.com> wrote in message
news:uT5iutzFEHA.2576@TK2MSFTNGP11.phx.gbl
>     Right. Thanks for this suggestion. You maybe right - but I
> suspect not (because I haven't been clear enough).
>
>     The content I will generate - itself - needs to have links. Those
> links are URLs, and the user must be able to click on them to link to
> other pages.
>
>     The 'about:blank.htm' - could perhaps be my root page? But what
> would the URL be of subsequent pages? Perhaps I could use a trick
> like?
>
>     about:blank.htm?REAL-URL=FOO
>
>     And then - in my DocumentComplete() handler - I grab the stuff
> after the question mark and use that to stream in the REAL HTML data?
> Is that perhaps what you were suggesting?
>
>     And what about POST's? DownloadComplete() doesn't seem to get the
> POST data. Also - I see no reason to what til the entire 'blank' page
> has been loaded! Why not just hook
> DWebBrowserEvents2::BeforeNavigate2 () instead?
>
>
>                     Lewis.
>
>
>
> "Igor Tandetnik" <itandetnik@mvps.org> wrote in message
> news:%23ZKpM9yFEHA.2160@TK2MSFTNGP12.phx.gbl...
>> "Lewis G. Pringle, Jr." <lewis@sophists.com> wrote in message
>> news:%237pb6hyFEHA.696@TK2MSFTNGP12.phx.gbl
>>> Folks:
>>>     I have an application which is generating HTML-format content
>>> (from a database), and I wish to display that content in an MSIE web
>>> control instance. The application doesn't even necessarily look like
>>> its a web browser. It just looks like a regular application, where
>>> the forms in the application just happen to be implemented in HTML.
>>
>> For simple HTML content, you can just do
>>
>>
>
http://msdn.microsoft.com/workshop/browser/webbrowser/tutorials/webocstream.asp
>>
>> An APP is very likely overkill for your problem.
>> --
>> With best wishes,
>>     Igor Tandetnik
>>
>> "For every complex problem, there is a solution that is simple, neat,
>> and wrong." H.L. Mencken


Relevant Pages