Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.3 KiB

  1. #ifndef _AUDIOLEVEL_H
  2. #define _AUDIOLEVEL_H
  3. #include "AudioCtl.h"
  4. #include "imsconf3.h"
  5. #define SIGNAL_STATUS_TRANSMIT 0x01 // data is being received/sent
  6. #define SIGNAL_STATUS_JAMMED 0x02 // wave dev failed to open
  7. const int g_nAudLevelTotalHeight = 30;
  8. const int g_nAudLevelMinWidth = 150;
  9. // CAudioLevel encapsulates the rebar band for the "signal level"
  10. // display (and mute buttons)
  11. class CAudioLevel : public CAudioEvent
  12. {
  13. public:
  14. CAudioLevel(CAudioControl *);
  15. ~CAudioLevel();
  16. BOOL Create(HWND hwndParent);
  17. BOOL OnTimer(WPARAM wTimerId);
  18. BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  19. BOOL ShiftFocus(HWND hwndCur, BOOL fForward);
  20. BOOL IsChildWindow(HWND hwnd);
  21. BOOL OnMuteChange(BOOL fSpeaker, BOOL fMute);
  22. BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *plRet);
  23. BOOL OnScroll(WPARAM wParam, LPARAM lParam);
  24. BOOL OnLevelChange(BOOL fSpeaker, DWORD dwVolume);
  25. BOOL OnDeviceChanged(void);
  26. BOOL OnDeviceStatusChanged(BOOL fSpeaker, UINT uEvent, UINT uSubCode);
  27. BOOL OnPaint(PAINTSTRUCT *ps);
  28. BOOL PaintChannel(BOOL fSpeaker, HDC hdc=NULL);
  29. BOOL PaintIcons(HDC hdc);
  30. BOOL Resize(int nLeft, int nTop, int nWidth, int nHeight);
  31. BOOL Show(BOOL bVisible);
  32. BOOL CreateBrushes();
  33. BOOL ForwardSysChangeMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
  34. private:
  35. HWND m_hwndParent;
  36. HWND m_hwndParentParent; // m_hwndParent's parent (rebar frame)
  37. HWND m_hwndMicTrack;
  38. HWND m_hwndMicTrackTT;
  39. HWND m_hwndSpkTrack;
  40. HWND m_hwndSpkTrackTT;
  41. HICON m_hIconSpkr;
  42. UINT m_uIconSpkrID;
  43. HICON m_hIconMic;
  44. UINT m_uIconMicID;
  45. HWND m_hwndChkbRecMute;
  46. HWND m_hwndChkbSpkMute;
  47. HWND m_hwndChkbRecMuteTT;
  48. HWND m_hwndChkbSpkMuteTT;
  49. CAudioControl *m_pAudioControl;
  50. RECT m_rect;
  51. BOOL m_fVisible;
  52. BOOL m_fMicTrkVisible;
  53. BOOL m_fSpkTrkVisible;
  54. RECT m_rcChannelSpk; // window area of the signal level
  55. RECT m_rcChannelMic; // window area of the signal level
  56. DWORD m_dwMicTrackPos, m_dwSpkTrackPos; // trackbar thumb positions
  57. DWORD m_dwMicLvl, m_dwSpkLvl; // signal level position
  58. HBRUSH m_hGreyBrush; // background
  59. HBRUSH m_hRedBrush, m_hYellowBrush, m_hGreenBrush, m_hBlackBrush;
  60. HPEN m_hHiLitePen, m_hShadowPen, m_hDkShadowPen, m_hLitePen;
  61. BOOL GetIconArea(BOOL fSpeaker, RECT *pRect);
  62. };
  63. #endif