en:docs:fapi:mougetnummickeys

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:mougetnummickeys [2021/10/06 13:20] – created prokusheven:docs:fapi:mougetnummickeys [2021/11/04 13:15] (current) prokushev
Line 1: Line 1:
-This call returns the number of buttons supported on the installed mouse driver.+{{page>en:templates:fapiint}}
  
-==Syntax== +====== MouGetNumMickeys ======
- MouGetNumButtons (NumberOfButtons, DeviceHandle)+
  
-==Parameters== 
-;NumberOfButtons (PUSHORT) - output : Address of the number of physical buttons. The return values for the number of buttons supported are: 
-::1 - One mouse button 
-::2 - Two mouse buttons 
-::3 - Three mouse buttons. 
-; DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen. 
  
-==Return Code== +This call returns the number of mickeys in each centimeter for the installed mouse driver.
-;rc (USHORT) - return:Return code descriptions are: +
-*385 ERROR_MOUSE_NO_DEVICE +
-*466 ERROR_MOU_DETACHED +
-*501 ERROR_MOUSE_NO_CONSOLE +
-*505 ERROR_MOU_EXTENDED_SG+
  
-==Bindings== +===== Syntax ===== 
-===C=== +<code c> 
-<PRE>+ MouGetNumMickeys (NumberOfMickeys, DeviceHandle) 
 +</code> 
 + 
 +===== Parameters ===== 
 + 
 +  * NumberOfMickeys (PUSHORT) - output : Address of the number of physical mouse motion units. Mouse motion units are reported in mickeys in each centimeter. This value is constant based upon the mouse device attached. 
 +  * DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen. 
 + 
 +===== Return Code ===== 
 + 
 +rc (USHORT) - return:Return code descriptions are: 
 + 
 +  *0 NO_ERROR 
 +  *385 ERROR_MOUSE_NO_DEVICE 
 +  *466 ERROR_MOU_DETACHED 
 +  *501 ERROR_MOUSE_NO_CONSOLE 
 +  *505 ERROR_MOU_EXTENDED_SG 
 + 
 +===== Bindings ===== 
 + 
 +====C==== 
 +<code c>
 #define INCL_MOU #define INCL_MOU
  
-USHORT  rc = MouGetNumButtons(NumberOfButtons, DeviceHandle);+USHORT  rc = MouGetNumMickeys(NumberOfMickeys, DeviceHandle);
  
-PUSHORT NumberOfButtons /* Number of mouse buttons */ +PUSHORT NumberOfMickeys; /* Number mickeys/centimeter */ 
-HMOU    DeviceHandle;     /* Mouse device handle */+HMOU    DeviceHandle;    /* Mouse device handle */
  
-USHORT  rc;               /* return code */ +USHORT  rc;              /* return code */ 
-</PRE>+</code>
  
-===MASM=== +====MASM==== 
-<PRE+<code asm
-EXTRN  MouGetNumButtons:FAR+EXTRN  MouGetNumMickeys:FAR
 INCL_MOU            EQU 1 INCL_MOU            EQU 1
  
-PUSH@  WORD    NumberOfButtons ;Number of mouse buttons+PUSH@  WORD    NumberOfMickeys ;Number mickeys/centimeter
 PUSH   WORD    DeviceHandle    ;Mouse device handle PUSH   WORD    DeviceHandle    ;Mouse device handle
-CALL   MouGetNumButtons+CALL   MouGetNumMickeys
  
 Returns WORD Returns WORD
-</PRE> 
- 
-==Example== 
-<code> 
- HMOU DeviceHandle; 
- ... 
- MouOpen(0L, &DeviceHandle); 
- MouGetNumButtons(&NumberOfButtons, DeviceHandle); 
 </code> </code>
  
-[[Category:Mou]]+{{page>en:templates:fapi}}