1
0

statusbar.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_STATUSBAR_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_STATUSBAR_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #define NWC_ONLINEMEDIASTATUSBAR L"Nullsoft_omBrowserStatusbar"
  8. BOOL Statusbar_RegisterClass(HINSTANCE hInstance);
  9. #define SBS_UPDATELAYOUT 0x00000001
  10. #define SBS_ACTIVE 0x00000002
  11. // messages
  12. #define SBM_FIRST (WM_USER + 10)
  13. #define SBM_UPDATESKIN (SBM_FIRST + 0) //wParam = not used, lParam = (LPARAM)(BOOL)redraw.
  14. #define Statusbar_UpdateSkin(/*HWND*/ __hStatusbar, /*BOOL*/ __fRedraw)\
  15. ((BOOL)SENDMSG(__hStatusbar, SBM_UPDATESKIN, 0, (LPARAM)(__fRedraw)))
  16. #define SBM_SETPARENTRECT (SBM_FIRST + 1) //wParam = not used, lParam = (LPCRECT)parentRect.
  17. #define Statusbar_SetParentRect(/*HWND*/ __hStatusbar, /*LPCRECT*/ __parentRect)\
  18. ((BOOL)SENDMSG(__hStatusbar, SBM_SETPARENTRECT, 0, (LPARAM)(__parentRect)))
  19. #define SBM_SETACTIVE (SBM_FIRST + 2) //wParam = (BOOL)fActive, lParam = not used.
  20. #define Statusbar_SetActive(/*HWND*/ __hStatusbar, /*BOOL*/ __fActive)\
  21. ((BOOL)SENDMSG(__hStatusbar, SBM_SETACTIVE, (WPARAM)(__fActive), 0L))
  22. #define SBM_UPDATE (SBM_FIRST + 3) //wParam = 0, lParam = (LPCWSTR)pszText.
  23. #define Statusbar_Update(/*HWND*/ __hStatusbar, /*LPCWSTR*/ __pszText)\
  24. ((BOOL)SENDMSG(__hStatusbar, SBM_UPDATE, 0, (LPARAM)(__pszText)))
  25. #define SBM_SETBROWSERHOST (SBM_FIRST + 4) //wParam = 0, lParam = (LPARAM)(HWND)hwndBrowserHost.
  26. #define Statusbar_SetBrowserHost(/*HWND*/ __hStatusbar, /*HWND*/ __hwndBrowserHost)\
  27. ((BOOL)SENDMSG(__hStatusbar, SBM_SETBROWSERHOST, 0, (LPARAM)(__hwndBrowserHost)))
  28. #define SBM_ENABLE (SBM_FIRST + 5) //wParam - not used, lParam = (LPARAM)(BOOL)fEnable. Return previous value
  29. #define Statusbar_Enable(/*HWND*/ __hStatusbar, /*BOOL*/ __fEnable)\
  30. ((BOOL)SENDMSG(__hStatusbar, SBM_ENABLE, 0, (LPARAM)(__fEnable)))
  31. // Notifications (WM_COMMAND)
  32. #define SBN_ENABLECHANGED 1
  33. #endif //NULLSOFT_WINAMP_OMBROWSER_STATUSBAR_HEADER