Annotation of mstools/samples/console/numbut.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: demoGetNumBut(HANDLE hConOut)                    *
                     18: *                                                            *
                     19: * PURPOSE: simply report the number of buttons on your mouse *
                     20: *                                                            *
                     21: * INPUT: the console output handle to write to               *
                     22: *************************************************************/
                     23: 
                     24: void demoGetNumBut(HANDLE hConOut)
                     25: {
                     26:   DWORD dwNumMouseButtons;
                     27:   BOOL bSuccess;
                     28:   CHAR szTemp[256];
                     29: 
                     30:   setConTitle(__FILE__);
1.1.1.3 ! root       31:   bSuccess = GetNumberOfConsoleMouseButtons(&dwNumMouseButtons);
1.1       root       32:   PERR(bSuccess, "GetNumberOfConsoleMouseButtons");
                     33:   myPuts(hConOut, "Using GetNumberOfConsoleMouseButtons to obtain the\n"
                     34:                   "number of buttons on your mouse...");
                     35:   sprintf(szTemp, "Your mouse has %d buttons.", dwNumMouseButtons);
                     36:   myPuts(hConOut, szTemp);
                     37:   myPuts(hConOut, "\nHit enter to return...");
                     38:   myGetchar();
                     39:   return;
                     40: }

unix.superglobalmegacorp.com

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