atVelu
atVelu

Reputation: 805

opening a URL in new tab

Is there a way to open a URL in a new tab (in IE) from a cpp application without using DDE or shell execute ??

Upvotes: 1

Views: 613

Answers (2)

i_am_jorf
i_am_jorf

Reputation: 54600

In general, you want to do something like this (error checking excluded to save me typing):

CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (void**)&browser); 
browser->Navigate(bstrURL, &vEmpty, &vEmpty, &vEmpty, &vEmpty);
browser->put_Visible(VARIANT_TRUE); 

Upvotes: 1

Max Frai
Max Frai

Reputation: 64266

You need just to send command to shell:

shell "explorer.exe %site_path%"

This should open IE with new tab and your site.

Upvotes: 0

Related Questions