|
|
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: demoGetNumBut(HANDLE hConOut) *
10: * *
11: * PURPOSE: simply report the number of buttons on your mouse *
12: * *
13: * INPUT: the console output handle to write to *
14: *************************************************************/
15:
16: void demoGetNumBut(HANDLE hConOut)
17: {
18: DWORD dwNumMouseButtons;
19: BOOL bSuccess;
20: CHAR szTemp[256];
21:
22: setConTitle(__FILE__);
23: GetNumberOfConsoleMouseButtons(&dwNumMouseButtons);
24: PERR(bSuccess, "GetNumberOfConsoleMouseButtons");
25: myPuts(hConOut, "Using GetNumberOfConsoleMouseButtons to obtain the\n"
26: "number of buttons on your mouse...");
27: sprintf(szTemp, "Your mouse has %d buttons.", dwNumMouseButtons);
28: myPuts(hConOut, szTemp);
29: myPuts(hConOut, "\nHit enter to return...");
30: myGetchar();
31: return;
32: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.