Link to home
Start Free TrialLog in
Avatar of kishj
kishj

asked on

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
Avatar of ShaunWilde
ShaunWilde

use ShellExecute
ShellExecute(hWnd,NULL, "http://www.linux.org", NULL,NULL,SW_SHOWNORMAL);
ASKER CERTIFIED SOLUTION
Avatar of ShaunWilde
ShaunWilde

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ambience
If shellexecute returns SE_ERR_ASSOCINCOMPLETE probably no browser is installed on your machine.

thanks