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