3 #if (!defined COMPILER_MSVC && defined PLATFORM_WINDOWS)
6 static FILE* pStdOut = 0;
7 static FILE* pStdErr = 0;
12 IsAConsolePort (HANDLE handle)
15 return (GetConsoleMode(handle, &mode) != 0);
21 bConsole = AttachConsole(ATTACH_PARENT_PROCESS);
22 hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
28 if ((bConsole) && (IsAConsolePort(hStdOut))) {
29 pStdOut = freopen(
"CONOUT$",
"w", stdout );
30 pStdErr = freopen(
"CONOUT$",
"w", stderr );
46 INPUT_RECORD input_record;
48 input_record.EventType = KEY_EVENT;
49 input_record.Event.KeyEvent.bKeyDown = TRUE;
50 input_record.Event.KeyEvent.dwControlKeyState = 0;
51 input_record.Event.KeyEvent.uChar.UnicodeChar = VK_RETURN;
52 input_record.Event.KeyEvent.wRepeatCount = 1;
53 input_record.Event.KeyEvent.wVirtualKeyCode = VK_RETURN;
54 input_record.Event.KeyEvent.wVirtualScanCode = MapVirtualKey( VK_RETURN, 0 );
57 WriteConsoleInput( GetStdHandle( STD_INPUT_HANDLE ), &input_record, 1, &written );
63 #elif (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
GTKMM_API const Gtk::BuiltinStockID FILE
static void console_madness_begin()
static void console_madness_end()