Annotation of mstools/samples/console/getlrgst.c, revision 1.1.1.3

1.1.1.3 ! root        1: 
        !             2: /******************************************************************************\
        !             3: *       This is a part of the Microsoft Source Code Samples. 
        !             4: *       Copyright (C) 1993 Microsoft Corporation.
        !             5: *       All rights reserved. 
        !             6: *       This source code is only intended as a supplement to 
        !             7: *       Microsoft Development Tools and/or WinHelp documentation.
        !             8: *       See these sources for detailed information regarding the 
        !             9: *       Microsoft samples programs.
        !            10: \******************************************************************************/
        !            11: 
1.1       root       12: #include <windows.h>
                     13: #include <stdio.h>
                     14: #include "console.h"
                     15: 
                     16: /*********************************************************************
                     17: * FUNCTION: demoGetLargest(HANDLE hConOut)                           *
                     18: *                                                                    *
                     19: * PURPOSE: demonstrate GetLargestConsoleWindowSize. Reports the size *
                     20: *          of the largest possible console window, given the current *
                     21: *          font.                                                     *
                     22: *                                                                    *
                     23: * INPUT: console input handle to query the information from and to   *
                     24: *        output to                                                   *
                     25: *********************************************************************/
                     26: 
                     27: void demoGetLargest(HANDLE hConOut)
                     28: {
                     29:   COORD coordLargest; /* hold the largest window size */
                     30:   CHAR szTemp[128];
                     31: 
                     32:   setConTitle(__FILE__);
                     33:   coordLargest = GetLargestConsoleWindowSize(hConOut);
                     34:   PERR(coordLargest.X | coordLargest.Y, "GetLargestConsoleWindowSize");
                     35:   myPuts(hConOut, "The largest console window size for this console, as\n"
                     36:                   "reported by GetLargestConsoleWindowSize, is:");
                     37:   sprintf(szTemp, "%d wide by %d high.", coordLargest.X, coordLargest.Y);
                     38:   myPuts(hConOut, szTemp);
                     39:   myPuts(hConOut, "\nHit enter to return...");
                     40:   myGetchar();
                     41:   return;
                     42: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.