Function 37 - get coordinates/status of the mouse.
Subfunction 0 - screen coordinates of the mouse
Parameters:
- eax = 37 - function number
- ebx = 0 - subfunction number
Returned value:
- eax = x*65536 + y, (x,y)=coordinates of the mouse pointer
(beginning from 0)
Subfunction 1 - coordinates of the mouse relative to the window
Parameters:
- eax = 37 - function number
- ebx = 1 - subfunction number
Returned value:
- eax = x*65536 + y, (x,y)=coordinates of the mouse pointer
relative to the application window (beginning from 0)
Remarks:
- The value is calculated by formula (x-xwnd)*65536 + (y-ywnd).
If y≥ywnd, the low word is non-negative and contains
relative y-coordinate, and the high word - relative x-coordinate
(with correct sign). Otherwise the low word is negative and still
contains relative y-coordinate, and to the high word
1 should be added.
Subfunction 2 - pressed buttons of the mouse
Parameters:
- eax = 37 - function number
- ebx = 2 - subfunction number
Returned value:
- eax contains information on the pressed mouse buttons:
- bit 0 is set = left button is pressed
- bit 1 is set = right button is pressed
- other bits are cleared