Hi All,
I'm having some problems getting this working, i have the interfaces
defined, i have a form with a web browser control on it, and i have a web
page which i want the context menu disabled and when a button is clicked to
callback to the application throught external.SomeMethod
Now, the following code is where i am setting the client site of the
browser:
public void SetClientSite(IOleClientSite clientSite)
{
object obj = webBrowser.GetOcx();
IOleObject oc = (IOleObject)obj;
oc.SetClientSite(clientSite); // clientSite is the form that contains the
bbrowser
}
This runs fine and does not produce any errors, but the problem is that when
i right click the page the ShowContextMenu method of the IDocHostUIHandler
interface is not fired even though it is implemented in the class:
uint IDocHostUIHandler.ShowContextMenu(uint dwID, ref tagPOINT ppt, object
pcmdtReserved, object pdispReserved)
{
return Convert.ToUInt32(this.enableContextMenus);
}
And the GetExternal method is likewise not being fired.
Can anyone help, what am i doing wrong?
Thank in advance
Neil