David,

All those interfaces you found in AxHost are for the general purpose of
hosting OCX controls. Keep in mind the the ocx control hosted inside is
WebBrowser, which in turn is the host of MsHtml. MsHtml was designed
specifically to allow a component hosting WebBrowser to customize MsHtml by
simply implementing IOleClientSite and other interfaces.

At runtime, when WebBrowser needs to load an Html page, it instantiates a
new copy of MsHtml. Upon creation, MsHtml checks WebBrowser's host to see
if it supports IOleClientSite. If so, MsHtml queries this host to see if it
implements IDocHostUIHandler and other interfaces. If so, it stores
references to then and calls them at a later time.

Note that none of this has anything to do with inplace activation, menu
merging, or other OLE2 features. Also, it might be worth adding that the
code works!  :-)

--Ted

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to