How can you view printf output in a Win32 application (entering with a WinMain) in Visual Studio 2010?
Here is a page that will tell you how to do this, including sample code.
You must create a console window using AllocConsole(), then associate the C standard file handles to the HANDLEs of the new console window.