barker7
2/26/2007 8:42:00 PM
I have created an IDocHostUIHandler class that I pass to the
AXWebBrowser class. Part of this interface is the callback method
"ShowContextMenu". It is called when the right mouse button is
clicked.
My question revolves around getting the Type of the pDispReserved
argument:
public uint ShowContextMenu(uint dwID, ref tagPOINT ppt, object
pcmdtReserved, object pdispReserved)
{
Write(string.Format("Context menu on: {0}",
pdispReserved.GetType().ToString()));
if (pdispReserved is HTMLAnchorElementClass)
{
// create the menu
.....
return 0;
}
return 1
}
Sometimes the type is"System.__ComObject", and other times is is of
type "HTMLAnchorElementClass". In both cases the user is right
clicking the same object on the browser.
Can someone explain why the browser would be passing me a
System.__ComObject object in stead of the HTMLAnchorElementClass
object?
Thanks
Mitch
Thanks