Problems with IWebBrowser2 and frames
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Problems with IWebBrowser2 and frames

  1. #1
    Join Date
    Jun 2009

    Question Problems with IWebBrowser2 and frames

    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:

    void CMyDlg::OnBeforeNavigate2Explorer1(LPDISPATCH pDisp,
    VARIANT FAR* Flags,
    VARIANT FAR* TargetFrameName,
    VARIANT FAR* PostData,
    VARIANT FAR* Headers,
    BOOL FAR* Cancel)

    if( is_an_unprocessed_file( URL ))
    // given the URL I create the output I want to show

    // cancel navigation of the original file
    *Cancel = (VARIANT_BOOL) 0xffff;

    // fire navigation to the processed file
    // 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...

    Do you have any suggestion??
    Thank you!

    PS: I am running these tests in XP with IE6.

  2. #2
    Join Date
    Jun 2009

    Re: Problems with IWebBrowser2 and frames


    any ideas?? any GURU around?


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center