Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Call my program itself.

Posted on 1999-01-25
1
Medium Priority
?
167 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
[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 10

Accepted Solution

by:
viktornet earned 100 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

715 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