How to print to C++Builder output window

I have a C++Builder 2010 project and want to add tests to it. So, instead of pausing the output of my console window to read the outcome of the tests, I want to print the same information to the Output Window in C++Builder (not in the Event Log).

So OutputDebugString is not an option for me. Is there some specific way to either redirect console output to the Output Window or to print directly there?


You can simply define a Post-build event in your Project Options to run your executable. Its console output will automatically be included in Output messages.


That window is for the output of the compilation process. It's not what you are looking for. You want to generate output whilst the program runs. I'd use the console or OutputDebugString or similar and I can't understand what you have against those options.

链接地址: http://www.djcxy.com/p/57798.html

上一篇: Ruby,Mongodb,Anemone:可能会发生内存泄漏的Web爬虫?

下一篇: 如何打印到C ++ Builder输出窗口