Is there a way to open a URL in a new tab (in IE) from a cpp application without using DDE or shell execute ??
A:
You need just to send command to shell:
shell "explorer.exe %site_path%"
This should open IE with new tab and your site.
Ockonal
2010-04-06 06:27:24
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).
atVelu
2010-04-06 06:55:28
+1
A:
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);
jeffamaphone
2010-04-06 17:21:47
One of the parameters (on Navigate2?) allows you to suggest if it should open in a foreground or background tab.
EricLaw -MSFT-
2010-04-08 02:18:15