CHtmlView::Navigate2 compile error

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi
I have this function in my MFC dialog:

----------------------------------------------------------------------------
-----------------
void CGenTemplatesDlg::OnBtShow()
{
CWebBrowser2 * pBrowse = (CWebBrowser2 *) GetDlgItem(IDC_EXPLORER1);
COleVariant sLoc(_T("http://www.google.com";));
pBrowse->Navigate2(sLoc, NULL, NULL, NULL, NULL);
}
----------------------------------------------------------------------------
-----------------

And on compiling i get this error:
----------------------------------------------------------------------------
-----------------
Linking...
GenTemplatesDlg.obj : error LNK2001: unresolved external symbol "public:
void __thiscall CWebBrowser2::Navigate2(struct tagVARIANT *,struct
tagVARIANT *,struct tagVARIANT *,struct tagVARIANT *,struct tagVARIANT *)"
(?Navigate2@CWebBrowser2@@QAEXPAUt
agVARIANT@@0000@Z)
Debug/GenTemplates.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
----------------------------------------------------------------------------
-----------------

What is wrong with the code, does anybody know?

Regards,
Mystique


.



Relevant Pages

  • Re: atlprint.h errors
    ... I am not sure if there is a fix for name collision between MFC and WTL in VS ... Compiling 'UTCTimeServerChecker.h'... ... C-style cast or function-style cast ...
    (microsoft.public.vc.language)
  • Return Value incorrect from Class Methods in a DLL
    ... called MyLib (MFC DLL with dynamic MFC linking) and the other is ... int GetCounter; ... // NOTE - the ClassWizard will add and remove member functions here. ... afx_msg void OnDestroy; ...
    (microsoft.public.windowsce.embedded.vc)
  • Need help with audio/video operations in dshow VC++ (MFC)
    ... DirectShow in VC6.0 (MFC). ... this video stream over the network, so that it could be rendered on the ... What directshow filters are available to transport audio/video over the ... void CDXCaptureDlg::OnSelchangeAudioList ...
    (microsoft.public.win32.programmer.directx.video)
  • Need help with audio/video operations in dshow VC++ (MFC)
    ... DirectShow in VC6.0 (MFC). ... this video stream over the network, so that it could be rendered on the ... What directshow filters are available to transport audio/video over the ... void CDXCaptureDlg::OnSelchangeAudioList ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: C++/CLI is the way to go
    ... Is mode pure compiling to IL code or is it not? ... ref class B: public A ... virtual void foverride ... References types with stack semantics at function scope are destroyed when leaving the scope, declared as class members they are not. ...
    (microsoft.public.dotnet.languages.csharp)