Opening an URL in C++
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
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
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
you are probobly just calling it wrong or somthing:
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]
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]
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
[edited by - thorpe on November 11, 2002 10:52:05 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement