setupcommon.h 969 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef NULLOSFT_WINAMP_SETUPCOMMON_HEADER
  2. #define NULLOSFT_WINAMP_SETUPCOMMON_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #ifndef LONGX86
  8. #ifdef _WIN64
  9. #define LONGX86 LONG_PTR
  10. #else /*_WIN64*/
  11. #define LONGX86 LONG
  12. #endif /*_WIN64*/
  13. #endif // LONGX86
  14. #ifdef __cplusplus
  15. #define SENDMSG(__hwnd, __msgId, __wParam, __lParam) ::SendMessageW((__hwnd), (__msgId), (__wParam), (__lParam))
  16. #else
  17. #define SENDMSG(__hwnd, __msgId, __wParam, __lParam) SendMessageW((__hwnd), (__msgId), (__wParam), (__lParam))
  18. #endif // __cplusplus
  19. #define SENDWAIPC(__ipcMsgId, __param) SENDMSG(hMainWindow, WM_WA_IPC, (WPARAM)(__param), (LPARAM)(__ipcMsgId))
  20. #define MSGRESULT(__hwnd, __result) { SetWindowLongPtrW((__hwnd), DWLP_MSGRESULT, ((LONGX86)(LONG_PTR)(__result))); return TRUE; }
  21. #define CSTR_INVARIANT MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)
  22. #endif // NULLOSFT_WINAMP_SETUPCOMMON_HEADER