subcalls.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MouSetScaleFact (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_MOU
 
USHORT MouSetScaleFact(pmouscFactors, hmou)
PSCALEFACT pmouscFactors;    /* address of structure for scaling factors */
HMOU hmou;                   /* mouse handle                             */
 
The MouSetScaleFact function sets the horizontal and vertical scaling
factors for the specified mouse. The scaling factors define the number of
mickeys the mouse must travel horizontally or vertically to cause MS OS/2 to
move the mouse pointer one screen unit.
 
Parameter      Description
────────────────────────────────────────────────────────────────────────────
 
pmouscFactors  Points to the SCALEFACT structure that contains the scaling
               factors.
 
hmou           Identifies the mouse. The handle must have been created
               previously by using the MouOpen function.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
 
     ERROR_MOUSE_NO_DEVICE
 
Example
 
This example creates a mouse handle, enables the mouse pointer to be drawn,
and retrieves the current scaling factor. It then doubles the scaling factor
and calls the MouSetScaleFact function to set the new factor. The result is
that you must move the mouse twice as far in order to move the pointer on
the screen:
 
SCALEFACT mouscFactors;
HMOU hmou;
MouOpen(0L, &hmou);
MouDrawPtr(hmou);
MouGetScaleFact(&mouscFactors,  /* retrieves current scaling factors */
    hmou);
mouscFactors.rowScale *= 2;     /* vertical scaling factor           */
mouscFactors.colScale *= 2;     /* horizontal scaling factor         */
MouSetScaleFact(&mouscFactors,  /* sets new scaling factors          */
    hmou);
 
See Also
 
MouGetScaleFact, MouOpen, SCALEFACT