Source code of Windows XP (NT5)
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.

86 lines
2.1 KiB

  1. #ifndef _TRACKBAR_H_
  2. #define _TRACKBAR_H_
  3. #define TRB_HORZ_W 150
  4. #define TRB_HORZ_H 30
  5. #define TRB_VERT_W 30
  6. // #define TRB_VERT_H 150
  7. #define TRB_VERT_H 140
  8. // audio control group box
  9. #define AC_VERT_H 40 // height
  10. #define AC_VERT_W 20 // width
  11. #define AC_VERT_M_X 6 // margin in x
  12. #define AC_VERT_M_Y 16 // margin in y
  13. #define TRB_CAPTION_X_MARGIN 4
  14. #define TRB_CAPTION_Y_MARGIN 0
  15. typedef struct tagTrackBarInfo
  16. {
  17. WORD wId;
  18. HWND hWnd;
  19. HWND hWndParent;
  20. DWORD dwStyle;
  21. BOOL fDlgUnit;
  22. POINT pt;
  23. SIZE size;
  24. WORD wMin;
  25. WORD wMax;
  26. WORD wCurrPos;
  27. WORD wTickFreq;
  28. WORD wPageSize;
  29. // description
  30. PTSTR pszTitle;
  31. PTSTR pszMin;
  32. PTSTR pszMid;
  33. PTSTR pszMax;
  34. }
  35. TRBARINFO;
  36. enum
  37. {
  38. UITB_CPU_ALLOC, // cpu allocation
  39. UITB_NETWORK_BW, // network bandwidth
  40. UITB_SILENCE_LEVEL_PS, // silence threshold in property sheet
  41. UITB_SILENCE_LIMIT, // silence buffer count
  42. UITB_SPEAKER_VOLUME, // playback volume control
  43. UITB_RECORDER_VOLUME, // recording volume control
  44. UITB_SPEAKER_VOLUME_MAIN, // playback volume control
  45. UITB_RECORDER_VOLUME_MAIN,// recording volume control
  46. UITB_SILENCE_LEVEL_MAIN,// silence threshold in main UI window
  47. UITB_SILENCE_LIMIT_MAIN,
  48. UITB_NumOfSliders
  49. };
  50. extern TRBARINFO g_TrBarInfo[UITB_NumOfSliders];
  51. #define ReversePos(p) (((p)->wMax - (p)->wCurrPos) + (p)->wMin)
  52. extern HWND g_hChkbSpkMute;
  53. extern HWND g_hChkbRecMute;
  54. extern HWND g_hChkbAutoDet;
  55. #define g_hTrbSpkVol (g_TrBarInfo[UITB_SPEAKER_VOLUME_MAIN].hWnd)
  56. #define g_hTrbRecVol (g_TrBarInfo[UITB_RECORDER_VOLUME_MAIN].hWnd)
  57. #define g_hTrbSilenceLevel (g_TrBarInfo[UITB_SILENCE_LEVEL_MAIN].hWnd)
  58. #define g_hTrbSilenceLimit (g_TrBarInfo[UITB_SILENCE_LIMIT_MAIN].hWnd)
  59. BOOL CreateTrBar ( HWND, TRBARINFO *, BOOL, UINT );
  60. LRESULT TrBarNotify ( WPARAM, LPARAM );
  61. TRBARINFO *LocateTrBar ( HWND );
  62. TRBARINFO *LocateTrBarByParent ( HWND );
  63. void DrawTrBarCaption ( HWND );
  64. BOOL CALLBACK PlayVolumeDlgProc ( HWND, UINT, WPARAM, LPARAM );
  65. BOOL CALLBACK RecordVolumeDlgProc ( HWND, UINT, WPARAM, LPARAM );
  66. void TrBarConvertDlgUnitToPixelUnit ( void );
  67. BOOL DockVolumeDlg ( int, BOOL );
  68. static BOOL CalcVolumeDlgRect ( int, RECT * );
  69. #endif // _TRACKBAR_H_