Web Browser Activex Problem RRS feed

  • Pergunta

    Hello everybody,

    I've been working on an application in MFC lately and now i have to include a web browser inside it.
    My application is developed in MSVC++ ( Visual Studio 2008 ) and it is dialog based. What i did is right click in resource view on the main dialog and choose "Insert Activex Control...". After that i selected Microsoft Web Browser an got an embedded browser on my dialog screen.

    I added a variable inside the activex control and named the class CExplorer1.
    In my dialog i added the following code:

    CPP / C++ / C Code:
    BOOL CWebBrowserDlg:nInitDialog() 
    // TODO: Add extra initialization here
    COleVariant varEmpty;
    ((CExplorer1*)GetDlgItem(IDC_EXPLORER1))->Navigate (L"",
                            &varEmpty, &varEmpty, &varEmpty, &varEmpty); return TRUE; }

    Everything works fine except enter key press when trying to search for a moveiclip. I also overloaded the IDOK button and commented OnOk() function so the application window would not close when hitting enter.

    If i load "" instead of "" enter key works just fine, so i guess the problem comes from the html tags used by "" in the search fields.

    Any ideeas or solutions would be appreciated.

    P.S. It's pretty urgent.

    terça-feira, 10 de fevereiro de 2009 17:56