GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 10-Feb-2009, 07:22
zaelix zaelix is offline
New Member
 
Join Date: Feb 2009
Posts: 1
zaelix is on a distinguished road
Exclamation

Web Browser Activex Problem


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 200 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"www.youtube.com", &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 "www.google.com" instead of "www.youtube.com" enter key works just fine, so i guess the problem comes from the html tags used by "www.youtube.com" in the search fields.

Any ideeas or solutions would be appreciated.

P.S. It's pretty urgent.

Regards.
Last edited by LuciWiz : 10-Feb-2009 at 08:34. Reason: Please insert your C++ between [cpp] & ]/cpp] tags
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding form tags in an activex web browser rachelason MS Visual C++ / MFC Forum 0 25-Jan-2007 03:27
Problem: Developing generic Toolbar in Activex. <Suggestions Needed> anup_daware MS Visual C++ / MFC Forum 0 04-Oct-2006 01:43
Problem with ActiveX Control Test Container anup_daware MS Visual C++ / MFC Forum 0 25-Sep-2006 00:54
ActiveX problem badprogrammer MS Visual C++ / MFC Forum 0 12-Feb-2006 20:07
An ActiveX Control does not work in VB, what problem would that be? mingcosp MS Visual C++ / MFC Forum 0 19-Jan-2005 10:04

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:15.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.