Solved

How to launch the Webbrowser in VC++?

Posted on 1997-05-26
1
224 Views
Last Modified: 2008-03-06
Hi All,
   In vc++, I want to launch the default Webbrowser to open the file.
How can I do it?

Thanks!!
Ben
ben@bestinfo.net
0
Comment
Question by:jpchen
1 Comment
 
LVL 6

Accepted Solution

by:
jpk041897 earned 50 total points
ID: 1163703
Use Winexec());

WinExec("PATH\BROWSER.EXE File:///c:|path/file", SW_NORMAL");


Notes:

PATH is the full path to your browser.
BROWSER.EXE is the filename of the browswer executable.(Example Netscape.exe or MSIE.exe)

The File:///<drive>|path/file.html is URL syntax for a file in a local drive. (File:/// indicates that it is in a local drive) notice that the <drive>: is changed to <drive>|  (bar)and backslashes are changed to slashes.For example:

c:\MyPath\Myfile

is mapped as:

c|/MyPath/Myfole
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Load and store *.pnm image file 1 84
mixing C++ & C# in Vis Studio 2013 7 170
c++ syntax question 9 48
C++ :Change value from  DisableCMD registry 4 59
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 how to clear a vector as well as how to detect empty vectors in C++.

786 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