Horizontal Mouse Position in CGA and MCGA Modes

Last reviewed: September 16, 1996
Article ID: Q67338
The information in this article applies to:
  • Microsoft Mouse Driver for MS-DOS, versions 6.x, 7.x, 8.x, and 9.0

SUMMARY

When you use the 320 by 200 CGA or MCGA graphics modes and a mouse, the horizontal coordinates returned by the driver are from 0 to 638 in increments of two.

The mouse driver returns a horizontal coordinate, which is twice the actual screen coordinate. However, the vertical coordinates correspond directly to the actual position on the screen.

MORE INFORMATION

Because the virtual screen for the mouse is in the range of 640 by 200 to 640 by 480, the virtual coordinate that maps to the actual screen coordinate must therefore be double the actual. The vertical coordinates in each case are 200 pixels, so there is a one-to-one mapping of the virtual and actual coordinates.

Reference(s):

"Microsoft Mouse Programmer's Reference Guide" Chapter 6


KBCategory: kbhw
KBSubcategory:
Additional reference words: 7.00 7.03 7.04 7.05 8.00 8.10 8.20 9.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.