David, Class AxHost is used to wrap the WebBrowser ActiveX component. The wrapping process is carried out automatically when you drop the WebBrowser component from the ToolBox onto a form in the Visual Studio Designer. It is unusual to use class AxHost directly (and I haven't had reason to do so yet).
The WebBrowser customizations described in the book are accomplished by a Windows Form (which can easily be replaced by a UserControl) that acts as an IOleClientSite and implements MsHtml customization interfaces, such as IDocHostUIHandler. The book shows the C# implementation of the following Ole interfaces: IOleClientSite, IOleObject, IDocHostUIHandler, IDocHostShowUI and ICustomDoc. --Ted On Mon, 29 Apr 2002 22:26:02 +0100, David Anthoff <[EMAIL PROTECTED]> wrote: >Oh, one more question: Would your approach still allow me to use >AxHost's default implementation of IOleClientSite, IOleControlSite, >IOleInPlaceSite, IPropertyNotifySink and ISimpleFrameSite that are >implemented in the private class OleInterfaces inside AxHost? If not, do >you provide alternative implementations for all these interfaces that >work the same way? I did think about just setting my own site via >IOleObject::SetClientSite, but figured that I would then more or less >break the internal handling of AxHost... > >Generally it looks as if Microsoft should have provided a way to use >their implementation of all these interfaces via something like good old >COM aggregation... Or are I am mistaken here? > >Thanks a lot for your help! >David > >> -----Original Message----- >> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf >Of >> Ted Faison >> Sent: Monday, April 29, 2002 9:17 PM >> To: [EMAIL PROTECTED] >> Subject: Re: [DOTNET] AxHost and IDocHostUIHandler: Check this new >book >> out >> >> David, >> >> The book shows how to make a Windows Form act as an OleClientSite, >> allowing >> all the various customization interfaces (such as IDocHostUIHandler, >> IDocHostShowUI and others) to be handled. >> >> --Ted >> >> >> On Sun, 28 Apr 2002 11:48:13 +0100, David Anthoff >> <[EMAIL PROTECTED]> >> wrote: >> >> >That sounds promising. I have one question though before I will buy >the >> >book: There are generally two ways to implement the >IDocHostUIHandler. >> >The first option is to attach it to the document via ICustomDoc, the >> >second is to implement it at the client site for the ActiveX control. >> >Which one is described in your book? I am only interested in the >second >> >method, since some of the features of IDocHostUIHandler will not work >if >> >you attach your implementation via ICustomDoc (e.g. the flags that >> >remove the border of the control). >> > >> >Thanks for the answer! >> >David >> > >> >> -----Original Message----- >> >> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On >Behalf >> >Of >> >> Ted Faison >> >> Sent: Saturday, April 27, 2002 11:22 PM >> >> To: [EMAIL PROTECTED] >> >> Subject: Re: [DOTNET] AxHost and IDocHostUIHandler: Check this new >> >book >> >> out >> >> >> >> There is a complete example of WebBrowser customization in the new >> >> book "Component-based development with Visual C#", available at >> >> >> >> >http://www.amazon.com/exec/obidos/ASIN/0764549146/qid=1019945959/sr=1- >> >> 1/ref=sr_1_1/104-7524942-0873504 >> >> >> >> Chapter 8 shows how to add IDocHostUIHandler and other interfaces >to a >> >> host >> >> form to fully customize the WebBrowser control. >> >> >> >> --Ted Faison >> >> >> >> You can read messages from the DOTNET archive, unsubscribe from >> >DOTNET, or >> >> subscribe to other DevelopMentor lists at >http://discuss.develop.com. >> > >> >You can read messages from the DOTNET archive, unsubscribe from >DOTNET, >> or >> >subscribe to other DevelopMentor lists at http://discuss.develop.com. >> >> You can read messages from the DOTNET archive, unsubscribe from >DOTNET, or >> subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. David, Class AxHost is used to wrap the WebBrowser ActiveX component. The You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.