views:

400

answers:

1

I'm hosting an Internet Explorer instance (the Web Control) in an CAxWindow ATL class. How do I prevent that a website could open a new window from the hosted IE? I'm already setting an implementation of IDocHostUIHandlerDispatch to disable the context menu.

+1  A: 

There is an event on the WebBrowser ActiveX control for displaying a new window (NewWindow, NewWindow2, NewWindow3) that you need to listen to and cancel.

Jeff Yates