[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Low-Level Mouse Functions
----------------------------------------------------------------------------
TSDWIN Low-Level mouse functions all have the prefix:
_twM....
Each is a call to DOS Interrupt 33h. The characters following the
'M' indicate the number of the Interrupt 33h function called
plus the register returned, if any. For example:
_twM3B() calls Interrupt 33h Function 3 and
returns the value in register BX.
If there is a parameter list, the arguments indicate the registers
to be loaded on executing the interrupt call. For example:
_twM4( nC, nD ) calls Interrupt 33h Function 4,
passing nC to register CX and
nD to register DX then
returning nothing.
_twM5C( nB ) calls Interrupt 33h Function 5,
passing nB to register BX, the
returning the value in register CX.
The virtual screen used by the mouse is NOT the same size as the
display screen. It is, by default, eight times wider and longer
than the display screen. All TSDWIN Low-Level mouse functions and
some high level functions return values based on the virtual
screen. It may be necessary to turn them into screen coordinates
with:
nScreenX := INT( nMouseX / 8 )
nScreenY := INT( nMouseY / 8 )
For both the screen and the mouse, the coordinate origin is the
top, left corner of the display area. Therefore, if you are using
row, column coordinates, please remember that:
Y denotes the ROW.
X denotes the COLUMN.
It is easy to become confused.
Please see any DOS Programmers' Reference for more information.
While TSDWIN does not support all Interrupt 33h function calls it
uses function calls which are supported by Microsoft Mouse Driver
version 7, except for four which are found in Version 8 and call
function 49. TSDWIN mouse support also works with equivalent
Logitech drivers.
All TSDWIN functions which include mouse support assume the mouse
cursor is off on entry. You may be assured that in most cases, you
will not have to worry about the trail in the display area left by
overwriting the mouse cursor if you use TSDWIN functions
exclusively. If you design your own functions, you will have to
take the mouse into account.
ALWAYS turn off the mouse cursor before writing to the screen,
then turn it on again after.
If you are using the software for both mouse/keyboard and keyboard
only environments, be sure to check that you can call a mouse
function by checking for the presence of a mouse with twOKMouse()
before calling the function. twOKMouse() is true if you have
initiated mouse support with twMouseInit() at the start of your
application, and there is a mouse present.
See Also:
PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson