Hey there, I'm fairly new to COM/ActiveX etc, and I have a question which is probably quite easy. First off, I'm using Visual C++ and the app I am writing has a WebBrowser control embedded in a dialog box. What I want to do is suppress the right-click menu in the WebBrowser window, and I got as far as finding the "oncontextmenu" property of IHTMLElement2. Thing is, according to MSDN, the put_oncontextmenu() function needs to be passed a "VARIANT of type VT_DISPATCH that specifies the IDispatch interface of an object with a default method that is invoked when the event occurs."
All I want is to give put_oncontextmenu() a function which does nothing, but it wants all this IDispatch stuff which seems awfully complicated (I know it's necessary but it's a pain in C++). I know how to use VARIANT but I don't know anything about IDispatch, or how to pass put_oncontextmenu() an IDispatch which does nothing.
Any help appreciated!
0 · ·