Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to launch the Webbrowser in VC++?

Posted on 1997-05-26
1
Medium Priority
?
245 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 100 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

963 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