Open a new browser in ATL 
Author Message
 Open a new browser in ATL

Hello,

I would like to open a new browser in ATL. I tried to use

CComQIPtr<IServiceProvider> spSP(m_spClientSite);
CComQIPtr<IWebBrowser2> pWebBrowser2;
spSP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2,
reinterpret_cast<void**>(&pWebBrowser2));
pWebBrowser2->Navigate2(&vURL, &vEmpty, &vEmpty, &vEmpty,
&vEmpty);

However, it only opens a new browser in the current
browser. How can I open another browser rather than
current browser?

Thank you.
David



Fri, 29 Apr 2005 20:21:03 GMT  
 Open a new browser in ATL
You can call Navigate specifying "_blank" as the target. Or, you can
create a completely new IE instance with
CoCreateInstance(CLSID_InternetExplorer)
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hello,

> I would like to open a new browser in ATL. I tried to use

> CComQIPtr<IServiceProvider> spSP(m_spClientSite);
> CComQIPtr<IWebBrowser2> pWebBrowser2;
> spSP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2,
> reinterpret_cast<void**>(&pWebBrowser2));
> pWebBrowser2->Navigate2(&vURL, &vEmpty, &vEmpty, &vEmpty,
> &vEmpty);

> However, it only opens a new browser in the current
> browser. How can I open another browser rather than
> current browser?



Sat, 30 Apr 2005 04:22:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BHO Problem (IE fails to open new browser from web page form)

2. How to open new browser instance?

3. Open a new IE browser

4. open new browser window....

5. Opening a new web browser in C#

6. CHtmlView - Open in new Window opens IExplorer

7. how to open new browser instance with an existing browser?

8. Shell Command: How to open a new IE window instead of creating a new IT application

9. Can't add new ATL class to ATL wizard generated solution

10. ATL wizard fails to create new ATL object

11. Error Insterting new New ATL Object from Visual Studio

12. How to start the default browser opening a web-page

 

 
Powered by phpBB® Forum Software