IWebBrowser2: Navigate2 ignored
From: Tim Bücker (timtos_NO-SPAm__at_web.de)
Date: 12/16/04
- Next message: derrick: "How do I take apart a string and get individual characters/words?"
- Previous message: Siemel Naran: "Re: Constructors And Exceptions"
- Next in thread: David White: "Re: IWebBrowser2: Navigate2 ignored"
- Reply: David White: "Re: IWebBrowser2: Navigate2 ignored"
- Reply: rixil_at_hotmail.com: "Re: IWebBrowser2: Navigate2 ignored"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Dec 2004 05:41:31 +0100
Hello.
I am trying to launch the internet explorer from my program using the code
seen below but unfortunately the Navigate2 command is ignored.
So Navigate2 is not working but calling GoHome() the start page is being
displayed...???
Has someone an idea what I am doing wrong?
Here´s the code:
HRESULT hr;
IWebBrowser2* pWebBrowser = NULL;
HRESULT comInit = CoInitializeEx(NULL,COINIT_MULTITHREADED);
hr = CoCreateInstance (CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER,
IID_IWebBrowser2, (LPVOID*)&pWebBrowser);
if (SUCCEEDED (hr) && (pWebBrowser != NULL))
{
m_pWebBrowser = pWebBrowser;
m_pWebBrowser->put_RegisterAsBrowser(VARIANT_TRUE);
m_pWebBrowser->put_AddressBar(VARIANT_FALSE);
m_pWebBrowser->put_MenuBar(VARIANT_FALSE);
m_pWebBrowser->put_StatusBar(VARIANT_FALSE);
m_pWebBrowser->put_ToolBar(VARIANT_FALSE);
m_pWebBrowser->put_Visible (VARIANT_TRUE);
m_pWebBrowser->put_Offline(VARIANT_FALSE);
}
else
{
if (pWebBrowser)
pWebBrowser->Release ();
}
CComVariant *url = new CComVariant("http://localhost/");
// VARIANT* url = new "http://www.microsoft.com";
m_pWebBrowser->Navigate2(url, NULL, NULL, NULL, NULL);
Thanks a lot for any help!
Greetings,
Tim.
- Next message: derrick: "How do I take apart a string and get individual characters/words?"
- Previous message: Siemel Naran: "Re: Constructors And Exceptions"
- Next in thread: David White: "Re: IWebBrowser2: Navigate2 ignored"
- Reply: David White: "Re: IWebBrowser2: Navigate2 ignored"
- Reply: rixil_at_hotmail.com: "Re: IWebBrowser2: Navigate2 ignored"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|