Reputation: 5
As the question mentions, I am finding it hard to debug and output in a Win32 Windows Program in Visual Studio. I have used SDL2.0 for OpenGL Projects and SDL window opens with the console as well, so it becomes easy to debug and output anything on the console anytime. How can I achieve this in Win32 API? Is it anyhow possible to open the console in a Win32 application?
Upvotes: 0
Views: 1144
Reputation:
You can do this via the AttachConsole and/or AllocConsole functions of the Windows Console API (see https://learn.microsoft.com/en-us/windows/console/console-functions). You can also simply create a Console Application in your IDE, and call your GUI code from that application.
Upvotes: 1