![](smile.gif)
Executing the deault browser
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
![](smile.gif)
ByteMe95::~ByteMe95()My S(h)ite
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)
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)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement