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