--- mstools/samples/console/scroll.c 2018/08/09 18:20:36 1.1 +++ mstools/samples/console/scroll.c 2018/08/09 18:21:17 1.1.1.2 @@ -1,8 +1,11 @@ #include #include "console.h" -/* this is the sample text that we will place on the lower half of -the screen to scroll */ +/* Microsoft Developer Support + Copyright (c) 1992 Microsoft Corporation */ + +/* The following is the sample text that we will place on the lower +half of the screen to scroll: */ static PCHAR szSampTxt = "BOOL˙ScrollConsoleScreenBuffer(˙hConsoleOutput, lpScrollRectangle,\n" @@ -74,7 +77,7 @@ void demoScrollCon(HANDLE hConOut) myGetchar(); myPuts(hConOut, szSampTxt); hStdIn = GetStdHandle(STD_INPUT_HANDLE); - PERR((int) hStdIn != -1,"GetStdHandle"); + PERR(hStdIn != INVALID_HANDLE_VALUE, "GetStdHandle"); bSuccess = GetConsoleMode(hStdIn, &dwStdInMode); PERR(bSuccess, "GetConsoleMode"); bSuccess = SetConsoleMode(hStdIn, dwStdInMode | ENABLE_MOUSE_INPUT);