Opening a url in Internet Explorer from my program

Started by
4 comments, last by TheBlackJester 21 years, 2 months ago
The subject pretty much covers it. I''m just looking for a way to call internet explorer and open up a url from my program. Any info?

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan Name: TheBlackJester Team: Wildfire Games
Projects O A.D. The Last Alliance

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan Name: [email=darkswordtbj@hotmail.com]TheBlackJester[/email]Team: Wildfire Games
Projects O A.D.The Last Alliance

Advertisement
Check out this article on MSDN about the ShellExecute API. You''ll want to use open for lpOperation and your URL goes into lpFile. Note that this will open the user''s default browser, which isn''t necessarily Internet Explorer. Hope this helps!

-Glyph
Thanx!

Default browser is actually what I''m looking for.. I was just stuck on this microsoft trip (shoot me)

Thanx again


"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan Name: TheBlackJester
Team: Wildfire Games

Projects
O A.D.
The Last Alliance

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan Name: [email=darkswordtbj@hotmail.com]TheBlackJester[/email]Team: Wildfire Games
Projects O A.D.The Last Alliance

This should do it:

system("start iexplore &url&";

replace &url& with the actual url of the site.

Later,
Jim
#include <cstdlib>
...
system("start iexplore \"http://www.gamedev.net/\"");

edit: just a little late...

[edited by - zealouselixir on January 28, 2003 10:06:06 PM]

[twitter]warrenm[/twitter]

Just system( "start www.gamedev.net" ); would work - with the default browser instead of hardcoding it to IE.

ShellExecute is better, tho...


"I know very well who Satan is: He is freedom. He is the uncontrolled, the incalculable, the antithesis of order and discipline, the antithesis of the legalism of outer space.... We know where a planet will be in twelve years, four months and nine days. But we don''t know where a butterfly will have flown one minute hence. Therefore the butterfly is of Satan."
-- Jens Bjørneboe
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement