Re: IDocHostUIHandler or IDocHostUIHandler2 ?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Charles Law (blank_at_nowhere.com)
Date: 07/03/04

  • Next message: nop90: "Controlling Download and Execution options"
    Date: Sat, 3 Jul 2004 23:28:13 +0100
    
    

    > Should I perform a call to SetUIHandler somewhere ?

    Yes. Call it from the DocumentComplete() event. You can implement the
    interface on the host or another class, so long as you inform the WebBrowser
    control when the document load is complete, as you need the document to get
    the ICustomDoc interface.

    HTH

    Charles

    "Jerome Schwindling" <jerome.schwindling@wanadoo.fr> wrote in message
    news:40e69937$0$20010$636a15ce@news.free.fr...
    >
    > Hello,
    >
    > I'm hosting a webbrowser control and I would like to get rid of the
    > context menu. So I implemented my IDocHostUIHandler class with a
    > ShowContextMenu function returning S_OK, and return the pointer to my
    > IDocHostUIHandler object in QueryInterface when the IID is
    > IID_IDocHostUIHandler
    >
    > This didn't work, and I realized that the QueryInterface was never
    > called with IID_IDocHostUIHandler, but is indeed called with
    > IID_IDocHostUIHandler2
    >
    > So I started again implementing my IDocHostUIHandler2 class, etc.... but
    > it still doesn't work. ShowContextMenu is never called....
    >
    > What am I missing ? Is it correct to use IDocHostUIHandler2 ? Should I
    > perform a call to SetUIHandler somewhere ?
    >
    > Many thanks
    > -----
    > Posté via http://www.usenetgratuit.com/ plus de 40 000 newsgroups sur le
    > Web. Pour signaler un abus : abuse@usenetgratuit.com
    >
    >


  • Next message: nop90: "Controlling Download and Execution options"

    Relevant Pages

    • Re: WebBrowser Control Printing
      ... this interface to control WebBrowser control's operation. ... I've decided to take advantage of the layout characteristics of HTML ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Override of WebBrowserSite IDocHostUIHandler using WebBrowser.CreateWebBrowserSiteBase doesnt wo
      ... behavior of the System.Windows.Forms.WebBrowser control as follows: ... implement classes that inherit from the WebBrowser ... or implement any other WebBrowser ActiveX control interface in order to ... implementation for any IDocHostUIHandler members, ...
      (microsoft.public.dotnet.framework.windowsforms)
    • Re: Windows Media Player Memory Leak
      ... QueryInterface from the Player for interfaces that are designed to be ... // QueryInterface for Settings interface ... Windows Media Player SDK ... I am using the Windows Media Player control to handle ...
      (microsoft.public.windowsmedia.sdk)
    • Re: .NET Control (form) used as ActiveX
      ... the WebBrowser has a "Document" property that implements ... you get the COM interface of your .NET control. ...
      (microsoft.public.dotnet.framework.interop)
    • Understanding automation
      ... the WebBrowser control or control an instance of ... the InternetExplorer application (OLE Automation). ... How can an instance of WebBrowser server be created by its own interface? ...
      (microsoft.public.vc.atl)