home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / UUPC11XS.ZIP / LIB / SCRSIZNT.C < prev    next >
C/C++ Source or Header  |  1992-12-05  |  1KB  |  39 lines

  1. /*--------------------------------------------------------------------*/
  2. /*                        System include files                        */
  3. /*--------------------------------------------------------------------*/
  4.  
  5. #include <stdio.h>
  6.  
  7. #include <windows.h>
  8.  
  9. /*--------------------------------------------------------------------*/
  10. /*                    UUPC/extended include files                     */
  11. /*--------------------------------------------------------------------*/
  12.  
  13. #include "lib.h"
  14. #include "scrsize.h"
  15.  
  16. /*--------------------------------------------------------------------*/
  17. /*    s c r s i z e                                                   */
  18. /*                                                                    */
  19. /*    Return screen size under Windows/NT                             */
  20. /*--------------------------------------------------------------------*/
  21.  
  22. short scrsize( void )
  23. {
  24.    CONSOLE_SCREEN_BUFFER_INFO info;
  25.    BOOL result;
  26.    HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
  27.  
  28.    result = GetConsoleScreenBufferInfo(hStdout, &info);
  29.  
  30.    if ( result != 0 )
  31.    {
  32.       printmsg(0,"Windows/NT error code %d retrieving console information",
  33.                GetLastError() );
  34.       return PAGESIZE;
  35.    }
  36.  
  37.    return info.dwSize.Y;
  38. } /* scrsize */
  39.