Solved

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

Posted on 2001-06-25
5
343 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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

726 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