| 1 |
/** |
| 2 |
* This file is part of the mingw-w64 runtime package. |
| 3 |
* No warranty is given; refer to the file DISCLAIMER within this package. |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <_mingw_unicode.h> |
| 7 |
#include <psdk_inc/_push_BOOL.h> |
| 8 |
|
| 9 |
#define MSH_MOUSEWHEEL __MINGW_STRING_AW("MSWHEEL_ROLLMSG") |
| 10 |
|
| 11 |
#define WHEEL_DELTA 120 |
| 12 |
|
| 13 |
#ifndef WM_MOUSEWHEEL |
| 14 |
#define WM_MOUSEWHEEL (WM_MOUSELAST+1) |
| 15 |
#endif |
| 16 |
|
| 17 |
#define MOUSEZ_CLASSNAME __MINGW_STRING_AW("MouseZ") |
| 18 |
#define MOUSEZ_TITLE __MINGW_STRING_AW("Magellan MSWHEEL") |
| 19 |
|
| 20 |
#define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME) |
| 21 |
#define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE) |
| 22 |
|
| 23 |
#define MSH_WHEELSUPPORT __MINGW_STRING_AW("MSH_WHEELSUPPORT_MSG") |
| 24 |
#define MSH_SCROLL_LINES __MINGW_STRING_AW("MSH_SCROLL_LINES_MSG") |
| 25 |
|
| 26 |
#ifndef WHEEL_PAGESCROLL |
| 27 |
#define WHEEL_PAGESCROLL (UINT_MAX) |
| 28 |
#endif |
| 29 |
|
| 30 |
#ifndef SPI_SETWHEELSCROLLLINES |
| 31 |
#define SPI_SETWHEELSCROLLLINES 105 |
| 32 |
#endif |
| 33 |
|
| 34 |
#ifndef __CRT__NO_INLINE |
| 35 |
__CRT_INLINE HWND HwndMSWheel (PUINT puiMsh_MsgMouseWheel, PUINT puiMsh_Msg3DSupport, PUINT puiMsh_MsgScrollLines, PBOOL pf3DSupport, PINT piScrollLines) { |
| 36 |
HWND hw = FindWindow (MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE); |
| 37 |
|
| 38 |
*puiMsh_MsgMouseWheel = RegisterWindowMessage (MSH_MOUSEWHEEL); |
| 39 |
*puiMsh_Msg3DSupport = RegisterWindowMessage (MSH_WHEELSUPPORT); |
| 40 |
*puiMsh_MsgScrollLines = RegisterWindowMessage (MSH_SCROLL_LINES); |
| 41 |
*pf3DSupport = (*puiMsh_Msg3DSupport ? (WINBOOL) SendMessage (hw, *puiMsh_Msg3DSupport, 0, 0) : FALSE); |
| 42 |
*piScrollLines = (*puiMsh_MsgScrollLines ? (int)SendMessage (hw, *puiMsh_MsgScrollLines, 0, 0) : 3); |
| 43 |
return hw; |
| 44 |
} |
| 45 |
#endif |
| 46 |
|
| 47 |
#include <psdk_inc/_pop_BOOL.h> |