Discussion:
MFC to open IE
(too old to reply)
Janiv Ratson
2006-01-02 10:29:39 UTC
Permalink
Hello,

What is the best programmatic way to open a URL explicitly using IE
(assuming IE is installed on a machine, but not assuming as a default
browser)?

Thanks,
Janiv Ratson.
Jonathan Wilson
2006-01-02 11:49:16 UTC
Permalink
It would appear that the easiest way to do it is to just run (via
ShellExecute, CreateProcess or whatever function you choose) the following
commandline:
iexplore http://www.abc.com/def/

Internet Explorer (at least as it is installed in my windows XP SP2
machine) will take a URL as a parameter and when passed a URL with no other
parameters, it opens that URL in a window (in my case, a new IE window will
be opened but that might depend on settings somewhere)
Mila
2006-01-02 15:24:03 UTC
Permalink
Hi,

simplest way to open any url in default browser:

ShellExecute(NULL, _T("open"), url, NULL,NULL, showcmd);

if you want to open url with IE when IE isn't default browser you should
launch iexplore.exe from <Program Files>\Internet Explorer and pass url as a
parameter in ShellExecute.
Post by Janiv Ratson
Hello,
What is the best programmatic way to open a URL explicitly using IE
(assuming IE is installed on a machine, but not assuming as a default
browser)?
Thanks,
Janiv Ratson.
Ajay Kalra
2006-01-02 16:03:20 UTC
Permalink
Use ShellExecute. It will open the *default browser*, whatever that happens
to be(IE or firefox etc).

--
Ajay Kalra [MVP - VC++]
Post by Janiv Ratson
Hello,
What is the best programmatic way to open a URL explicitly using IE
(assuming IE is installed on a machine, but not assuming as a default
browser)?
Thanks,
Janiv Ratson.
Janiv Ratson
2006-01-08 13:48:45 UTC
Permalink
Hello and thanks,
On the contrary, I need to open IE specifically(even if firefox is the
default brpwser), because these are MCE html files.
Thanks,
Janiv Ratson.
Post by Ajay Kalra
Use ShellExecute. It will open the *default browser*, whatever that happens
to be(IE or firefox etc).
--
Ajay Kalra [MVP - VC++]
Post by Janiv Ratson
Hello,
What is the best programmatic way to open a URL explicitly using IE
(assuming IE is installed on a machine, but not assuming as a default
browser)?
Thanks,
Janiv Ratson.
jiangsheng[MVP]
2006-01-02 18:55:25 UTC
Permalink
http://www.codeproject.com/shell/AutomateShellWindow.asp
Post by Janiv Ratson
Hello,
What is the best programmatic way to open a URL explicitly using IE
(assuming IE is installed on a machine, but not assuming as a default
browser)?
Thanks,
Janiv Ratson.
David Ching
2006-01-08 20:38:46 UTC
Permalink
Post by Janiv Ratson
Hello,
What is the best programmatic way to open a URL explicitly using IE
(assuming IE is installed on a machine, but not assuming as a default
browser)?
Launch "iexplore.exe" using ShellExecute and specify the url on the
command-line.

-- David

Loading...