how to redirect the ouput from the windows console to vc++ ouput window

  • Thread starter Thread starter pri
  • Start date Start date
P

pri

i need to run a command line tool by clicking on an add in toolbar button.i have tried it using ShellExecute & CreateProcess methods.But both open up the default console window.Is there any way in which I can redirect the output from the console to the output window in vc++?Or maybe im not using the correct methods.Any suggestions please?

From http://developmentnow.com/g/42_2004_9_8_0_0/dotnet-languages-vc.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 
i need to run a command line tool by clicking on an add in toolbar button.i
have tried it using ShellExecute CreateProcess methods.But both open up the
default console window.Is there any way in which I can redirect the output
from the console to the output window in vc++?Or maybe im not using the
correct methods.Any suggestions please?

search for 'console redirect' on www.codeproject.com
there are plenty of examples on how to do this in C++.

If you are using C++/CLI you can also use the .NET class 'Process' which has
easy to use methods for redirecting the input, output and error streams of a
console application.

If you don't want the console windows itself you have to run it hidden. in
..NET you can do this by configuring Process.StartInfo. in native you can do
something similar. I believe one of the codeproject articles explains this.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
Back
Top