Solved

How to launch the Webbrowser in VC++?

Posted on 1997-05-26
1
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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++.

738 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