![]() |
![]() |
![]() |
Sets the mouse event callback function.
Syntax
VOID DXUTSetCallbackMouse(
LPDXUTCALLBACKMOUSE pCallbackMouse, BOOL bIncludeMouseMove );
Parameters
- pCallbackMouse
- [in] Pointer to an LPDXUTCALLBACKMOUSE mouse event callback function. If supplied, the callback function will be called for mouse events.If NULL, the sample framework will not notify the application about mouse events.
- bIncludeMouseMove
- [in] If TRUE, the Microsoft Windows WM_MOUSEMOVE
message is passed to the pCallbackMouse callback function. Default value is FALSE.
Return Value
No return value.
Remarks
The pCallbackMouse mouse event callback function will be called when any one of the following mouse events occurs:
- WM_LBUTTONDBLCLK
- WM_LBUTTONDOWN
- WM_LBUTTONUP
- WM_MBUTTONDBLCLK
- WM_MBUTTONDOWN
- WM_MBUTTONUP
- WM_MOUSEWHEEL
- WM_RBUTTONDBLCLK
- WM_RBUTTONDOWN
- WM_RBUTTONUP
- WM_XBUTTONDBLCLK
- WM_XBUTTONDOWN
- WM_XBUTTONUP
This callback mechanism is provided to simplify handling mouse messages through the Windows message pump, but does not preclude the application from handling those messages directly through the Windows WindowProc
callback function.
Function Information
Header dxut.h Import library None Minimum operating systems Windows 98
See Also
Message Events, LPDXUTCALLBACKMOUSE, LPDXUTCALLBACKKEYBOARD, LPDXUTCALLBACKMSGPROC, DXUTSetCallbackKeyboard, DXUTSetCallbackMsgProc, WindowProc