Call AllocConsole() at the beginning of your application. Only one console can be allocated for a process. Next, call WriteConsole to show a text. void CMyApp::LogDebug(LPCSTR p) { if(m_bAppDebug) { DWORD d; WriteConsoleA( GetStdHandle(STD_OUTPUT_HANDLE), (CONST VOID *)p, strlen(p), &d, NULL ); WriteConsoleA( GetStdHandle(STD_OUTPUT_HANDLE), (CONST VOID *)"\r\n", 2, &d, NULL ); } }void CMyApp::LogDebug(LPCSTR p)… Continue reading Add a debug console to your windows gui application