Function 37 - work with 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
Subfunction 4 - load cursor
Parameters:
- eax = 37 - function number
- ebx = 4 - subfunction number
- dx = data source:
- dx = LOAD_FROM_FILE = 0 - data in a file
- ecx = pointer to full path to the cursor file
- the file must be in the format .cur, which is standard for
MS Windows, at that of the size 32*32 pixels
- dx = LOAD_FROM_MEM = 1 - data of file are already loaded in memory
- ecx = pointer to data of the cursor file
- the data format is the same as in the previous case
- dx = LOAD_INDIRECT = 2 - data in memory
- ecx = pointer to cursor image in the format ARGB 32*32 pixels
- edx = 0xXXYY0002, where
- XX = x-coordinate of cursor hotspot
- YY = y-coordinate
- 0 ≤ XX, YY ≤ 31
Returned value:
- eax = 0 - failed
- otherwise eax = cursor handle
Subfunction 5 - set cursor
Sets new cursor for the window of the current thread.
Parameters:
- eax = 37 - function number
- ebx = 5 - subfunction number
- ecx = cursor handle
Returned value:
- eax = handle of previous cursor
Remarks:
- If the handle is incorrect, the function restores the default
cursor (standard arrow). In particular, ecx=0 restores it.
Subfunction 6 - delete cursor
Parameters:
- eax = 37 - function number
- ebx = 6 - subfunction number
- ecx = cursor handle
Returned value:
Remarks:
- The cursor must be loaded previously by the current thread
(with the call to subfunction 4). The function does not delete
system cursors and cursors, loaded by another applications.
- If the active cursor (set by subfunction 5) is deleted,
the system restores the default cursor (standard arrow).