MS VC++ 6.0: Output window instead of DOS prompt console?

Is it possible to configure the editor to use the "Output window" at the bottom of the screen instead of the DOS prompt window (console applications) for program output while debugging?
boomerang061797Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nietodCommented:
"configure the editor "?   Do you mean program?

You can output information to the output window using the OutputDebugString() procedure.  

Let me know if you have any questions.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
boomerang061797Author Commented:
Actually I mean configure. With this I mean that I wish the program output to be produced in the output window. The OutputDebugString() will probably work too. Could you give an example (#includes, etc.)
0
nietodCommented:
There is nothing special to be done.  Just include windows.h as you would in any windows program.   Then just pass a string to the procedure, like

OutputDebugString("Appears in output window")'

You can place newline characters (\n) inside the string to force a line break.  
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

boomerang061797Author Commented:
Actually I mean configure. With this I mean that I wish the program output to be produced in the output window. The OutputDebugString() will probably work too. Could you give an example (#includes, etc.)
0
boomerang061797Author Commented:
It works, but the text is written to the same panel as the Compiler/Linker uses. Is there a way to open a dedicated panel like the Profile, Compiler/Linker, Find in files, SQL Debugging etc use.

What is the Results panel used for?
0
nietodCommented:
>> Is there a way to open a dedicated panel l
No.  Or at least I really doubt it.  It is possible to create add-ins for vissual studio that can add panes to the window, but I don't think there would be a way to redirect the debug information to a different pane.

Results panel used for?
It displays database querry results, maybe other things.
0
boomerang061797Author Commented:
I've been trying it out and it seems like a handy feature. The only thing I don't understand is why (when in debugging mode) the output is written to the Debug panel when I step through the program, but not when I run the program in debugging mode.

My code is:

#ifdef _DEBUG
  OutputDebugString("Debugging string\n");
#endif

Surly the _DEBUG is defined when the program is compiled in debug mode so why no output when not stepping.
0
nietodCommented:
Are you sure it isn't being written?  When the program ends, a lot of stuff gets written to that window.  So it is possible that your messages have scrolled up off the top of the window.  

(I use this to trace progress through my program and definitely see the messages even when not single-stepping..)
0
boomerang061797Author Commented:
No my window is always blank until I step the program.
0
nietodCommented:
Do you have another debugger on that system?  like maybe a hardware debugger like periscope or soft-ice?
0
boomerang061797Author Commented:
No, just the standard Enterprise setup on a local machine.
0
nietodCommented:
I don't understand that.  It works for me.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.