Re: How get original IDocHostUIHandler



How easy :) Thank you!

Charles Law wrote:

Hi Ivan

Implement IDocHostUIHandler and return default values from each method to get default behaviour. In ShowContextMenu(), if you return S_FALSE then the default menu will be displayed. Return S_OK to suppress it, and you can display your own. You do not need a reference to the default interface.

HTH

Charles


"Ivan Glinka" <ivan@xxxxxxxxx> wrote in message news:dv7fgk$1303$1@xxxxxxxxxxxxxxxxx

Hi,

I want to implement my IDocHostUIHandler interface, but actually I want to implement only ShowContextMenu function. I think I can do it, but the problem is that I want to either display my menu or the original one - that one which is supplied by the IE.

I think I need to keep the pointer to the original IDocHostUIHandler interface (let's call the pointer m_IDocHostUIHandler ) and then depending on the situation I will return either
m_IDocHostUIHandler->ShowContextMenu(...)
or implement my own menu.

All other functions I would like to implememt like proxy. For example, for EnableModeless:
return (m_IDocHostUIHandler) ? m_IDocHostUIHandler->EnableModeless(fEnable) : S_OK;

So the question how can I get the pointer to the original IDocHostUIHandler interface? I mean that one that is used by the webbrowser control when I don't implement my own.

All the docs say is that web browser will QueryInterface IOleClientSite for that interface, but I implement IOleClientSite...




.



Relevant Pages

  • WebBrowser control breaks Hotmail and Yahoo Mail
    ... I have implemented the IDocHostUIHandler interface to ... This only happens on Hotmail when using the Rich Text ... the WebBrowser control and IDocHostUIHandler and they all have the same ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: How to call C# function from HTML page?
    ... You have to have the page perform a postback and then have the ... implement the IDocHostUIHandler interface. ... IDocHostUIHandler to it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Deriving from WebBrowserSite
    ... the IDocHostUIHandler as MSDN states: ... Here are snippets of the relevant code: ... The problem is that the ExtendedWebBrowserSite IDocHostUIHandler interface ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: customizing browser control menu in dialog based application
    ... interfaces.. ... wats the next step..? ... If you have properly implemented IDocHostUiHandler, your ShowContextMenu ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Call C++ method from Javascript in page
    ... IDocHostUIHandler and ICustomDoc. ... while the popup blocker is getting the IWebBrowser2 ... pointer from SetSite, since it implements IObjectWithSite. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)