Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ByteMe95

Executing the deault browser

This topic is 6479 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I''m writign a game in VC with DX. I really dont know much about windows programming, so I need some help. I want to be able to minimize the game window and launch the user''s default browser with a specified URL, so that they can go to a part of the game website straight from teh game. Anyone know any windows function that could do that? Or if not, just simply how to run a program from my game, I think if i run the browser exe with the URL as an argument, it''ll do it as well. I tried system() cause that''s all I know frm my Borland C DOS days but, that didnt really work. Thanks for the help ByteMe95::~ByteMe95() Cerebrum Software

Share this post


Link to post
Share on other sites
Advertisement
Try looking at the ShellExecute function

ShellExecute( hWnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd );

I think (you''ll need to check this) that if you just do:

ShellExecute( hWnd, NULL, "http://www.gamedev.net", NULL, NULL, SW_SHOWNORMAL );

the browser will open up at the specified page (the other function to look at might be WinExec)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!