Solved

Call my program itself.

Posted on 1999-01-25
1
163 Views
Last Modified: 2010-04-02
What is the difference between print banding and
non-banding ? Which is the better ?
What is the difference between programming in lazer printer
and HP Deskjet (670C)printer ?
How can I return the program after I sent WM_CLOSE to it( that means I want to close my program and after that it can
call itself again), like this :
 My program include 2 modun A and B. At the beginning, A can run or call B. If A call B, B is ruuning and when B finished it auto close the program and call again to the beginning (A run) . User only can close program only they close A.



0
Comment
Question by:longlong
1 Comment
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1185128
you can use one of these...

WinExec()
ShellExecute()
CreateProcess()

then when you execute app B it would wait and see when A is gonna close down. When this happens your B programs does some stuff and runs back app A, and the process can continue on and on...

YOu can use WaitForSingleObject() so your program can wait until the other closes down...

Hope this helps...

-Viktor
--Ivanov
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

821 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