Terminal control/Dimensions: Difference between revisions

Content added Content deleted
(→‎{{header|Forth}}: original was wrong as of gforth 0.7.0; + SwiftForth)
(→‎Windows: When opening the console, use flags that Microsoft recommends at http://msdn.microsoft.com/en-us/library/aa363858%28v=VS.85%29.aspx)
Line 54: Line 54:
short rows;
short rows;
short columns;
short columns;

/* Create a handle to the console screen. */
/* Create a handle to the console screen. */
console = CreateFileW(L"CONOUT$",
console = CreateFileW(L"CONOUT$", GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
GENERIC_READ | GENERIC_WRITE, 0, 0, 0, 0, NULL);
0, NULL);
if (console == INVALID_HANDLE_VALUE)
if (console == INVALID_HANDLE_VALUE)
return 1;
return 1;