Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

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

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
kishj
Asked:
kishj
  • 3
1 Solution
 
ShaunWildeCommented:
use ShellExecute
0
 
graham_kCommented:
ShellExecute(hWnd,NULL, "http://www.linux.org", NULL,NULL,SW_SHOWNORMAL);
0
 
ShaunWildeCommented:
eg ShellExecute(handle, "open", "http://www.experts-exchange.com", NULL, NULL, SW_SHOWNORMAL);

0
 
ambienceCommented:
If shellexecute returns SE_ERR_ASSOCINCOMPLETE probably no browser is installed on your machine.

0
 
ShaunWildeCommented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now