[Webinar] Streamline your web hosting managementRegister Today

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

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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