Hello,
I'm attempting to cancel the opening of a new IE7 tab when a user right-clicks a link and chooses "Open in New Tab" or "Open in New Window". The following code from our BHO's Invoke method did the trick for IE6, but it doesn't for IE7. Should this still work for IE7, or should it be done differently for IE7
Thanks,
Roy
case DISPID_NEWWINDOW3:
// This is a new (post-XPSP2) version of IE, which generates the NEWWINDOW3 event.
{
if (!ContinueNavigating(pDispParams->rgvarg[0].bstrVal, this))
{
// Suppress the navigation.
*(pDispParams->rgvarg[3].pboolVal) = VARIANT_TRUE;
}
}
break;

IE7 - Cancel New Tab or New Window
MMCompton
Mirza Ashraf
Dhivya.S
Aabra
PublicError
I am afraid that you are accessing the parameters with wrong indices.
From http://msdn.microsoft.com/library/default.asp url=/workshop/browser/webbrowser/reference/ifaces/dwebbrowserevents2/newwindow3.asp
void NewWindow3(IDispatch **&ppDisp,
VARIANT_BOOL *&Cancel,
DWORD dwFlags,
BSTR bstrUrlContext,
BSTR bstrUrl
);