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
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
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.
Re: Run an MFC application from console
Thank you, it is a very simple solution :)