|
|
1.1 root 1: #include <windows.h>
2: #include <stdio.h>
3: #include "console.h"
4:
1.1.1.2 ! root 5: /* Microsoft Developer Support
! 6: Copyright (c) 1992 Microsoft Corporation */
! 7:
1.1 root 8: /*********************************************************************
9: * FUNCTION: demoGetLargest(HANDLE hConOut) *
10: * *
11: * PURPOSE: demonstrate GetLargestConsoleWindowSize. Reports the size *
12: * of the largest possible console window, given the current *
13: * font. *
14: * *
15: * INPUT: console input handle to query the information from and to *
16: * output to *
17: *********************************************************************/
18:
19: void demoGetLargest(HANDLE hConOut)
20: {
21: COORD coordLargest; /* hold the largest window size */
22: CHAR szTemp[128];
23:
24: setConTitle(__FILE__);
25: coordLargest = GetLargestConsoleWindowSize(hConOut);
26: PERR(coordLargest.X | coordLargest.Y, "GetLargestConsoleWindowSize");
27: myPuts(hConOut, "The largest console window size for this console, as\n"
28: "reported by GetLargestConsoleWindowSize, is:");
29: sprintf(szTemp, "%d wide by %d high.", coordLargest.X, coordLargest.Y);
30: myPuts(hConOut, szTemp);
31: myPuts(hConOut, "\nHit enter to return...");
32: myGetchar();
33: return;
34: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.