Article View: borland.public.cppbuilder.internet.web
Article #1303Re: About WebBrowser Customization.. Please Help me..
From: Remy Lebeau (TeamB)
Date: Tue, 08 Mar 2005 18:06
Date: Tue, 08 Mar 2005 18:06
33 lines
2430 bytes
2430 bytes
"jini" <fseconds@hotmail.com> wrote in message
news:422d9caa@newsgroups.borland.com...
> How get pOleObject, pOleDocumentSite, pOleClientSite, pCustomDoc,
> pHostUIHandler, pHostShowUI, pCustomDoc.. Etc ??
You are querying the interfaces from the wrong place. IDocHostUIHandler,
etc, are not implemented in IHTMLWindow2. In fact, you probably did not
carefully read what Microsoft was actually saying about IDocHostUIHandler.
You are supposed to implement **YOUR OWN** custom IDocHostUIHandler-derived
class and then give it to the browser for use. You are not supposed to be
querying it from the browser. Please re-read the "WebBrowser Customization"
article again. It specifically says as much:
"These are interfaces that you implement in your application when you
want to modify the WebBrowser Control."
That means, you have to provide your own class(es) that are derived from
IOleClientSite, IDocHostUIHandler, etc. You obtain the browser's
IWebBrowser2 interface, not IHTMLWindow2, and then query it for IOleObject.
From there, you use IOleObject::SetClientSite() to pass the browser your own
IOleClientSite. The browser queries the other interfaces from your own
IOleClientSite.
In the case of ICustomDoc, the browser does provide that, but again not from
IHTMLWindow2. Using ICustomDoc, you can then pass your custom
IDocHostUIHandler-derived class to the browser via the
ICustomDoc::SetUIHandler() method. Using IOleObject and IOleClientSite is
more flexible than using ICustomDoc, though.
Gambit
Technical Details
Message-ID:
<422de978@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<422d9caa@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,2e915bcaf988658 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.web References: <422d9caa@newsgroups.borland.com> Subject: Re: About WebBrowser Customization.. Please Help me.. Date: Tue, 8 Mar 2005 10:06:04 -0800 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <422de978@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1110305144 68.69.17.41 (8 Mar 2005 10:05:44 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail