Solved

How can I launch my application inside another application in MFC

Posted on 2009-04-08
8
396 Views
Last Modified: 2013-11-20
Experts,

What is the simplest or easiest technique for launching one of my applications inside another of my applications in MFC VC++ 6.0?
0
Comment
Question by:JPM2002
  • 5
  • 2
8 Comments
 
LVL 4

Expert Comment

by:StefanKittel
ID: 24102394
Hello,

what do you mean? Please specify.

Stefan
0
 
LVL 1

Expert Comment

by:DaRakNa
ID: 24102848
Command is:

You must replace "C:\\Cpp\\ExpertExchange\\2x.exe" with your second program exact location.
ShellExecute(NULL, NULL,"C:\\Cpp\\ExpertExchange\\2x.exe",NULL, NULL, SW_SHOWNORMAL);

Open in new window

0
 
LVL 1

Expert Comment

by:DaRakNa
ID: 24102853
Also you must include dos.h library.
#include <dos.h>

Open in new window

0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Expert Comment

by:DaRakNa
ID: 24102860
No need to include dos.h for this function.
0
 

Author Comment

by:JPM2002
ID: 24103307
doesn't work.

Here is what I typed

HINSTANCE H;

H = ShellExecute(NULL, NULL, "C:\\Projects\\2PC\\Debug,NULL,NULL,SW_SHOWNORMAL");





I get 2 errors

error 2001: newline in constant    // I don't see any newlines

error 2143: syntax error: missing ')' before string  // don't see any parentheses missing
0
 
LVL 1

Expert Comment

by:DaRakNa
ID: 24103313
Try this:
HINSTANCE H;
 
H = ShellExecute(NULL, NULL, "C:\\Projects\\2PC\\Debug.exe",NULL,NULL,SW_SHOWNORMAL);

Open in new window

0
 

Author Comment

by:JPM2002
ID: 24103351
Not needed... I found that I had an extra quotation mark at the end before the closing parentheses
that was causing the errors.

Thanks it works great.


0
 
LVL 1

Accepted Solution

by:
DaRakNa earned 250 total points
ID: 24103407
Great. Don't forget to accept solution and asign points. :)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 62
Process filename extension 3 186
matchUp  challenge 6 64
Fibonacci challenge 11 124
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

803 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