By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

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

P: n/a
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_...nguages-vc.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Mar 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>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.
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.