zmouse.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #include <_mingw_unicode.h>
  6. #include <psdk_inc/_push_BOOL.h>
  7. #define MSH_MOUSEWHEEL __MINGW_STRING_AW("MSWHEEL_ROLLMSG")
  8. #define WHEEL_DELTA 120
  9. #ifndef WM_MOUSEWHEEL
  10. #define WM_MOUSEWHEEL (WM_MOUSELAST+1)
  11. #endif
  12. #define MOUSEZ_CLASSNAME __MINGW_STRING_AW("MouseZ")
  13. #define MOUSEZ_TITLE __MINGW_STRING_AW("Magellan MSWHEEL")
  14. #define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME)
  15. #define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE)
  16. #define MSH_WHEELSUPPORT __MINGW_STRING_AW("MSH_WHEELSUPPORT_MSG")
  17. #define MSH_SCROLL_LINES __MINGW_STRING_AW("MSH_SCROLL_LINES_MSG")
  18. #ifndef WHEEL_PAGESCROLL
  19. #define WHEEL_PAGESCROLL (UINT_MAX)
  20. #endif
  21. #ifndef SPI_SETWHEELSCROLLLINES
  22. #define SPI_SETWHEELSCROLLLINES 105
  23. #endif
  24. #ifndef __CRT__NO_INLINE
  25. __CRT_INLINE HWND HwndMSWheel (PUINT puiMsh_MsgMouseWheel, PUINT puiMsh_Msg3DSupport, PUINT puiMsh_MsgScrollLines, PBOOL pf3DSupport, PINT piScrollLines) {
  26. HWND hw = FindWindow (MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
  27. *puiMsh_MsgMouseWheel = RegisterWindowMessage (MSH_MOUSEWHEEL);
  28. *puiMsh_Msg3DSupport = RegisterWindowMessage (MSH_WHEELSUPPORT);
  29. *puiMsh_MsgScrollLines = RegisterWindowMessage (MSH_SCROLL_LINES);
  30. *pf3DSupport = (*puiMsh_Msg3DSupport ? (WINBOOL) SendMessage (hw, *puiMsh_Msg3DSupport, 0, 0) : FALSE);
  31. *piScrollLines = (*puiMsh_MsgScrollLines ? (int)SendMessage (hw, *puiMsh_MsgScrollLines, 0, 0) : 3);
  32. return hw;
  33. }
  34. #endif
  35. #include <psdk_inc/_pop_BOOL.h>