I am using VS2008 (C++) to create an IE plugin that creates a child window. It is like a normal Explorer window, but customized to fit my needs. I want to destroy the window when the user navigates away from the page, by calling DestroyWindow().
I do not know how to detect if the user has navigated away. Is there an event listener/handler that I can put in my code to accomplish this?.
I have seen a few in javascript that does that, but I need to use C++.
You could sync the Navigate() events in DWebBrowser2, and determine if the target URL is outside the context that you care about.