Hi all,
I have the following problem with an MFC application: in my app I have embedded internet explorer via a "standard" CWebBrowser2 wrapper and everything goes well (clicks, navigation, etcetc).
In my app I need to change "on the fly" the files that IE is going to show, for example: the user clicks to "original.html" and I show "processed.html", where processed.html is created on the fly from some dbase.
Till now I have done it using a OnBeforeNavigate2Explorer1 function like:
if( is_an_unprocessed_file( URL ))
{
// given the URL I create the output I want to show
CreateMyProcessedFile(URL,"processed.html");
// cancel navigation of the original file
*Cancel = (VARIANT_BOOL) 0xffff;
// fire navigation to the processed file
m_browser.Navigate("processed.html",Flags,TargetFrameName,PostData,Headers);
return;
}
// if we are here IE is going to visit a processed file: it's ok.
*Cancel = (VARIANT_BOOL) 0x0;
}
everything works fine as far as original.html does not use frames.....
If original.html uses frames (either a frameset or an iframe) the "child" documents are not shown inside the main one but in a new window, i.e. a standard IE window pops up.
I have tried something with the TargetFrameName variable but with no luck...
Bookmarks