[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • 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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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