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