MouSetScaleFact: Difference between revisions
m Ak120 moved page OS2 API:CPI:MouSetScaleFact to MouSetScaleFact |
No edit summary |
||
Line 43: | Line 43: | ||
[[Category: | [[Category:Mou]] |
Revision as of 00:34, 16 January 2017
Description
Assigns a new set of scaling factors to the current mouse device driver.
Syntax
#define INCL_MOU #include <os2.h> PSCALEFACT ScaleStruct; /* Address of scaling factors. */ HMOU DeviceHandle; /* Reserved. Must be 0. */ APIRET rc; /* Return code */ rc = MouSetScaleFact(ScaleStruct, DeviceHandle);
Parameters
- ScaleStruct (PSCALEFACT) - input
- Address of scaling factors.
The address of the control block structure that contains the current row-and-column coordinate scaling factors. The scaling factors must be greater than or equal to 1 and less than or equal to (32K-1).
- DeviceHandle (HMOU) - input
- Reserved. Must be 0.
Return Code
rc (APIRET) - returns
MouSetScaleFact returns one of the following values:
- 0 NO_ERROR
- 387 ERROR_MOUSE_INV_PARMS
- 466 ERROR_MOU_DETACHED
- 501 ERROR_MOUSE_NO_CONSOLE
Remarks
MouSetScaleFact sets the mickey-to-pixel ratio for mouse motion. The row scale and column scale ratios specify a number of mickeys for each 8 pixels. The default value for the row scale is 16 mickeys for each 8 pixels. The default value for the column scale is 8 mickeys to 8 pixels.
The number of pixels moved does not have to be one-to-one for the number of mickeys the mouse moves. The scaling factor defines a sensitivity for the mouse that is a ratio of the number of mickeys required to move the cursor 8 pixels on the screen. The sensitivity determines at what rate the cursor moves on the screen.