Solved

Activating a browser from a C++ program (borland c++ to be specific)

Posted on 2001-06-25
5
337 Views
Last Modified: 2010-04-02
I have a C++ application - when the user clicks on a button, it needs to take them to a vendor web site (this is dictated by the vendor who supplies a library I use).

I have not idea what browser, if any the user may have installed.. they may not even have one.

Is there a recommended way to activate a web link if the user has a browser installed? I don't want to prompt them for any information.. if it fails, (i.e. no browser installed or available) then I plan on not displaying anything different..

Thanks,
Jeff Kish
0
Comment
Question by:kishj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6224507
use ShellExecute
0
 
LVL 6

Expert Comment

by:graham_k
ID: 6224513
ShellExecute(hWnd,NULL, "http://www.linux.org", NULL,NULL,SW_SHOWNORMAL);
0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 100 total points
ID: 6224514
eg ShellExecute(handle, "open", "http://www.experts-exchange.com", NULL, NULL, SW_SHOWNORMAL);

0
 
LVL 22

Expert Comment

by:ambience
ID: 6226605
If shellexecute returns SE_ERR_ASSOCINCOMPLETE probably no browser is installed on your machine.

0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6228088
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Find Visual Studio Tools 2 121
Safe conversion? 4 75
C++ mouse_event mouse look 7 111
trigs fail! I thought I knew how to do trignometry 3 82
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question