onMouseUp (hWnd, button, x, y)
This callback is invoked when a mouse button is released.
Parameter | Description |
---|---|
hWnd | The handle to the window that triggered the event |
button | A constant that identifies the button that was released. See onMouseDown for a list of button constants. |
x | The x coordinate where the button was released. Relative to the upper left hand corner of the window |
y | The y coordinate where the button was released. Relative to the upper left hand corner of the window |
0
This is a callback function. You must supply this function yourself. To register this callback, call the WinXRegOnMouseUp function.
It is possible for the user to press the mouse button over your window and release it elsewhere. In this case you the onMouseDown callback will be called, but not the onMouseUp callback. To make sure you get the onMouseUp callback, capture the mouse using the SetCapture and ReleaseCapture Win32 API functions.
In general, if an action occurs when the user clicks something, you should cause that action to occur when the onMouseUp callback is invoked, not the onMouseDown callback. This gives the user a chance to cancel the action by moving the mouse away from your window and releasing it there.
FUNCTION onMouseUp (hWnd, button, x, y)
END FUNCTION |