473,499 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
1 1963
>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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
21038
by: Omid | last post by:
Hi. I have problems when I try to redirect everything that is sent to cout to a file. I have one piece of code that works and one that does not work. The only difference is which headers I use....
2
1880
by: Jason | last post by:
Hello, I have a class, transCore, that does certain work, and by default, prints its progress to the stand output. Later, I will to write a GUI class that encapsulate the transCore class. I...
7
1781
by: MuZZy | last post by:
HI I just wonder if someone can help me with this: I have a windows app project developed on VC++ 6.0. I need to adapt it to be able to compile as a console app as well (So it would call main()...
4
8714
by: Bill Cohagan | last post by:
I'm writing a console app (in C#) and I want to be able to redirect the standard input/output streams when it's run at a command prompt. IOW I want to support the "<" and ">" redirection syntax....
1
1737
by: Alucard | last post by:
hello all, how do i do a redirection of ouput from a console process to some textbox? For example, in Visual Studio, when you build a solution, the console output from the compiler (another...
2
3961
by: booker | last post by:
Hi, As i known,all the c++ compiler under windows platform are of console application. I'm really curious why when they are called by their native IDE(borland c++ ide,visuall c++ ide...
2
4861
by: Schorschi | last post by:
Ok, I have my own console class that lets me allocate a console, free it, etc. in my windows vb .net application, hell it even hides the cursor, set colors, etc. But the one thing I want to do is...
5
1488
by: vedrandekovic | last post by:
Hello, e.g I need run my my_scripts_setup.bat that contain: python myscript_setup.py py2exe Can I cover or redirect log of that process into my wx program? I'am using Windows XP SP2, and...
13
4173
by: rufus | last post by:
Is there a C++ compiler for windows that can be run from the commmandline? I have only be able to find MS Visual Studio but its rather overkill since I also like to just use notepad for my code.
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.