![]() |
![]() |
![]() |
Application-defined mouse event callback function, called by the sample framework when it receives mouse events.
Syntax
typedef VOID (CALLBACK *LPDXUTCALLBACKMOUSE)(
bool bLeftButtonDown, bool bRightButtonDown, bool bMiddleButtonDown, bool bSideButton1Down, bool bSideButton2Down, INT nMouseWheelDelta, INT xPos, INT yPos );
Parameters
- bLeftButtonDown
- [in] The left mouse button is down.
- bRightButtonDown
- [in] The right mouse button is down.
- bMiddleButtonDown
- [in] The middle mouse button is down.
- bSideButton1Down
- [in] Microsoft Windows 2000/Windows XP: The first X button is down.
- bSideButton2Down
- [in] Windows 2000/Windows XP: The second X button is down.
- nMouseWheelDelta
- [in] The distance and direction the mouse wheel has rolled, expressed in multiples or divisions of WHEEL_DELTA, which is 120. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user.
- xPos
- [in] x-coordinate of the pointer, relative to the upper-left corner of the client area.
- yPos
- [in] y-coordinate of the pointer, relative to the upper-left corner of the client area.
Return Value
No return value.
Remarks
This callback function will be called when any one of the following mouse events occurs:
- WM_LBUTTONDOWN
- WM_LBUTTONDBLCLK
- WM_LBUTTONUP
- WM_MBUTTONDBLCLK
- WM_MBUTTONDOWN
- WM_MBUTTONUP
- WM_MOUSEWHEEL
- WM_RBUTTONDBLCLK
- WM_RBUTTONDOWN
- WM_RBUTTONUP
- WM_XBUTTONDOWN
- WM_XBUTTONDBLCLK
- WM_XBUTTONUP
This callback mechanism is provided to simplify handling mouse messages through the window's message pump, but the application may still handle mouse messages directly through the Windows WindowProc
callback function.
Prototype Information
Header dxut.h Import library None Minimum operating systems Windows 98
See Also
Message Events, DXUTSetCallbackMouse, DXUTSetCallbackKeyboard, DXUTSetCallbackMsgProc, LPDXUTCALLBACKMSGPROC, LPDXUTCALLBACKKEYBOARD, WindowProc