| | |
Cross Platform Way to Open Websites
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2008
Posts: 2
Reputation:
Solved Threads: 0
Hi everyone,
Is there any way to open a website in the default browser that will be cross-platform?
Right now I'm using:
But this Windows only of course.
Thanks,
Brett
Is there any way to open a website in the default browser that will be cross-platform?
Right now I'm using:
C++ Syntax (Toggle Plain Text)
#include <windows.h> ShellExecute(NULL, "open", "http://sourceforge.net/projects/tro", NULL, NULL, SW_SHOWNORMAL);
But this Windows only of course.
Thanks,
Brett
>Is there any way to open a website in the default browser that will be cross-platform?
Who defines what the 'default' browser is defined as? Sure, on Windows it's some registry entry, but on other operating systems there often is no default browser.
Who defines what the 'default' browser is defined as? Sure, on Windows it's some registry entry, but on other operating systems there often is no default browser.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
Hmm,
Look: I use Linux, and I have firefox in it as my favorite browser. Every time I need to open a URL, I call
What I suggest is, you can try conditional compiling in this case.
This will make your code portable to a great extend( but not complete portable).
Look: I use Linux, and I have firefox in it as my favorite browser. Every time I need to open a URL, I call
$ firefox URL So, if you are saying cross-platform, your problem is merely to open a file in some application.What I suggest is, you can try conditional compiling in this case.
This will make your code portable to a great extend( but not complete portable).
Siddhant Sanyam
(Not posting much)
My Blog: Yatantrika
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
(Not posting much)
My Blog: Yatantrika
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
![]() |
Similar Threads
- PHP/MySQL Developer (Web Development Job Offers)
- At Wit's End: Some Webpages Don't Load; Can Ping Some Sites, Not Others (Viruses, Spyware and other Nasties)
- Browser Battle -- Your TOP Pick! (Geeks' Lounge)
Other Threads in the C++ Forum
- Previous Thread: Bidirectional shift register
- Next Thread: Borland C++ application GUI problem
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






