1

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

1
  • 1
    In general, whether links open in a new window or a new tab is up to the user. Commented Apr 6, 2010 at 6:26

2 Answers 2

1

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); 
Sign up to request clarification or add additional context in comments.

1 Comment

One of the parameters (on Navigate2?) allows you to suggest if it should open in a foreground or background tab.
0

You need just to send command to shell:

shell "explorer.exe %site_path%"

This should open IE with new tab and your site.

1 Comment

As I mentioned in the question, I don't want to do a Shell launch .... I'm basically looking for a IPC mechanism with IE (except for DDE).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.