-
February 7th, 2013, 09:26 AM
#1
Run an MFC application from console
Hello,
I have a question about to run an MFC dialog based C++ application from console:
if I run my application from console, I see the application start and the console immediately back to prompt.
I need that console wait the application exit before show me the prompt again.
I tried on Visual Studio 6, 2005 and 2010 but the behavior is the same.
Can anyone explain me if there is solution to avoid this?
Thank you
Rob
-
February 7th, 2013, 09:38 AM
#2
Re: Run an MFC application from console
Try this command in the console instead of simply entering your app's name:
Code:
start /wait <your app>
See also http://technet.microsoft.com/en-us/l.../bb491005.aspx
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
February 7th, 2013, 09:46 AM
#3
Re: Run an MFC application from console
The behavior is standard in Windows command console. When you run GUI process, no matter MFC or not, command prompt returns immediately after process creation. To instruct console to wait for process finish start /WAIT command should be used explicitly.
Best regards,
Igor
-
February 7th, 2013, 10:16 AM
#4
Re: Run an MFC application from console
Thank you, it is a very simple solution
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|