Solved

Connecting two projects

Posted on 2000-05-15
9
157 Views
Last Modified: 2013-11-20
Hi,
  Is it possible to connect two different projects. Say, a dialog application on clicking the ok button,should open another project,which is an MDI Application.

Thanx,
Thiru
0
Comment
Question by:thirumaran
[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
  • 4
  • 4
9 Comments
 
LVL 3

Expert Comment

by:MDarling
ID: 2810171
connect? do you mean communicate between the 2 processes just have the dialog spawn the other exe.

if the latter thejust use CreateProcess.

regards,
Mike.
0
 
LVL 3

Expert Comment

by:shaig
ID: 2810230
If you mean "projects" then:
Create a workspace that contains the two projects.
0
 

Author Comment

by:thirumaran
ID: 2810366
Hi,
     I have to call another exe,as soon as i click the ok button in the dialog box after checking all the necessary validations.This is what i want.Just help me out in this problem.
Thanx,
Thiru
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:MDarling
ID: 2811078
use CreateProcess in OnOK


    STARTUPINFO SI;
    PROCESS_INFORMATION PI;
    ZeroMemory(&SI,sizeof(STARTUPINFO));
    SI.cb=sizeof(STARTUPINFO);
    if(CreateProcess(0,strExeToSpawn.GetBuffer(0),0,0,0,0,0,0,&SI,&PI)==0)
    {
        MessageBox(0,"Failed to Start Program...","Error",MB_OK);

regards,
Mike.

0
 

Author Comment

by:thirumaran
ID: 2813044
Hi Mike,
  Will it be possible for you to explain the code a bit. I am not able to get the usage of strExetoSpawn in createprocess function.
I have to call another project from this dialog based application.The called project is an MDI application.Is this possible.Please give me an example.

Thanx,
Thiru
0
 
LVL 3

Accepted Solution

by:
MDarling earned 20 total points
ID: 2813515
yeah sure, strExeToSpawn is just a CString containing the name of your program.

the code could just as easily be...

STARTUPINFO SI;
    PROCESS_INFORMATION PI;
    ZeroMemory(&SI,sizeof(STARTUPINFO));
    SI.cb=sizeof(STARTUPINFO);
    if(CreateProcess(0,"MyApp.exe",0,0,0,0,0,0,&SI,&PI)==0)
    {
        MessageBox(0,"Failed to Start Program...","Error",MB_OK);

ok?

Have you got the help files for Windows.  It's all explained in there.

regards,
Mike.



0
 

Author Comment

by:thirumaran
ID: 2815914
HI Mike,
    The program is showing assertion error.If you please give me your mailid i will be able to mail u both the projects,so that you can tell me where i made the mistake.

Thanx,
Thiru
0
 

Author Comment

by:thirumaran
ID: 2815924
Hi Mike,
   Sorry for the previous comment. I made it without fully checking my code.
Now i ahd made it work.
Thanx for your timely help,
Thanx again,
Thiru
0
 
LVL 3

Expert Comment

by:MDarling
ID: 2816288
no problem, glad you got it working.

regards,
Mike.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

690 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