Nicholas
Tue Oct 19 13:18:54 CDT 2004
Robert,
This is definitely a good place to start. Granted, you won't want to
provide the visual elements in hosting (because I assume that would bring
you back to the same problem you had before), but it will show you how to
host MSHTML.
Check out the section of MSDN titled "Reusing MSHTML", located at (watch
for line wrap):
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/hosting/hosting.asp
It will give you a good idea of where to start. Everything is done in
C++, but can be converted to interop calls.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Robert Jordan" <robertj@gmx.net> wrote in message
news:cl3l8d$ga1$03$1@news.t-online.com...
> Hi Nicholas,
>
>> Yes, you are using MSHTML, but you are getting it from a WebBrowser
>> control, and I believe that this is the issue. You need to create an
>> instance of MSHTML.HTMLDocument yourself, and load the content into
>> there. The document on it's own doesn't require interaction with the
>> desktop (even though you still have access to javascript events and the
>> like).
>>
>> You will have to create an IPersistMoniker definition, and then
>> upload your content through the call to Load. It's a lot of work, but
>> the only way to untie the document from the visualizer (which is the
>> control).
>
> That's a good starting point:
>
> "Writer", hosted on the GotDotNet Workplaces.
> Quite high quality [Lutz Roeder ("Reflector") is involved].
>
> Another project:
>
>
http://www.itwriting.com/htmleditor/index.php
>
> As far I can recall, the project embeds MSHTML exactly as you
> recommend, but I don't think that IPersistMoniker is used.
>
> bye
> Rob