Solved

Starting a program.

Posted on 2000-05-11
1
210 Views
Last Modified: 2013-11-20
How do I start a program? I have a program that exports an HTML-document, and I want to open it in the standard browser when it's exported. How can I do that? The browser may not be as a child-process from my own program, it has to be independent. I think I can start it by trying to start the HTML-file itself.
0
Comment
Question by:ToniVR
1 Comment
 
LVL 1

Accepted Solution

by:
tvanceplus earned 20 total points
Comment Utility
First, you need to get the paths of the browser and the html file.

//standard ie path
CString browserPath;
browserPath="c:\\program files\\"+
  "internet explorer\\iexplore.exe";

CString htmlPath;
htmlPath="c:\\webpage.html";

WinExec(browserPath+" "+htmlPath,
        SW_SHOWNORAML);

Good Luck!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

9 Experts available now in Live!

Get 1:1 Help Now