Opening an URL in C++

Started by
4 comments, last by thorpe 21 years, 5 months ago
I want to open an URL in the standard browser by a call in a C++ program. Which functions should I call? Johan Torp - http://www.destruction.nu
Johan Torp - http://www.destruction.nu
Advertisement
ShellExecute
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Thanks!

Though I get a problem, when I run shellexecute, my program freezes. How do I launch the browser in parallell?


Johan Torp - http://www.destruction.nu
Johan Torp - http://www.destruction.nu
you are probobly just calling it wrong or somthing:
ShellExecute( hWindow, NULL, "http://www.gamedev.net", NULL, NULL, SW_SHOWNORMAL );  

is how i do it (well... you gota replace with the real url),
and you have to have hWindow set as the calling window. not shure if it can be null or not. beter just set it as the desktop to be shure.




[edited by - aftermath on November 11, 2002 7:43:17 AM]
Rate me up.
I should have mentioned that I'm running a DirectX fullscreen game. It seems that no more messages (including WM_SETFOCUS) goes to the game dialog after I have called ShellExecute(). If I send a message just before I run ShellExecute() then it's recevied but all messages sent afterwards are not received and I cannot maximize the game from the taskbar anymore (close is the only option which isn't ghosted if I right click on the 'task window' in the taskbar).

Johan Torp - http://www.destruction.nu

[edited by - thorpe on November 11, 2002 10:52:05 AM]
Johan Torp - http://www.destruction.nu
There was another bug which caused these syndroms.
Sorry to have bothered you!

Johan Torp - http://www.destruction.nu
Johan Torp - http://www.destruction.nu

This topic is closed to new replies.

Advertisement