IE7 - Cancel New Tab or New Window

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;


Answer this question

IE7 - Cancel New Tab or New Window