Solved

How to launch the Webbrowser in VC++?

Posted on 1997-05-26
1
212 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now