1
0

commandbar.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef NULLOSFT_MEDIALIBRARY_COMMANDBAR_CONTROL_HEADER
  2. #define NULLOSFT_MEDIALIBRARY_COMMANDBAR_CONTROL_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <windows.h>
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #ifndef CBM_FIRST
  11. #define CBM_FIRST (WM_APP + 100)
  12. #endif
  13. #define CBM_GETBESTHEIGHT (CBM_FIRST + 1)
  14. #define CBM_GETOWNER (CBM_FIRST + 2)
  15. #define CBM_SETOWNER (CBM_FIRST + 3)
  16. #define CBM_GETDATA (CBM_FIRST + 4)
  17. #define CBM_SETDATA (CBM_FIRST + 5)
  18. #define CommandBar_GetBestHeight(/*HWND*/ __hwndCB)\
  19. ((INT)(INT_PTR)SENDMSG((__hwndCB), CBM_GETBESTHEIGHT, 0, 0L))
  20. #define CommandBar_GetOwner(/*HWND*/ __hwndCB)\
  21. ((HWND)SENDMSG((__hwndCB), CBM_GETOWNER, 0, 0L))
  22. #define CommandBar_SetOwner(/*HWND*/ __hwndCB, /*HWND*/ __hwndNewOwner)\
  23. ((BOOL)SENDMSG((__hwndCB), CBM_SETOWNER, 0, (LPARAM)(__hwndNewOwner)))
  24. #define CommandBar_GetData(/*HWND*/ __hwndCB)\
  25. ((HWND)SENDMSG((__hwndCB), CBM_GETDATA, 0, 0L))
  26. #define CommandBar_SetData(/*HWND*/ __hwndCB, /*ULONG_PTR*/ __userData)\
  27. ((BOOL)SENDMSG((__hwndCB), CBM_SETDATA, 0, (LPARAM)(__userData)))
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif // NULLOSFT_MEDIALIBRARY_COMMANDBAR_CONTROL_HEADER