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.

88 lines
2.7 KiB

  1. //
  2. // propperf.h: local resources prop pg
  3. // Tab E - Performance TAB
  4. //
  5. // Copyright Microsoft Corportation 2000
  6. // (nadima)
  7. //
  8. #ifndef _propperf_h_
  9. #define _propperf_h_
  10. #include "sh.h"
  11. #include "tscsetting.h"
  12. #include "tsperf.h"
  13. //
  14. // String table resources are cached in a global table
  15. // and shared between this prop page and the main dialog
  16. // page
  17. //
  18. #define PERF_OPTIMIZE_STRING_LEN 128
  19. extern BOOL g_fPropPageStringMapInitialized;
  20. typedef struct tag_PERFOPTIMIZESTRINGMAP
  21. {
  22. int resID;
  23. TCHAR szString[PERF_OPTIMIZE_STRING_LEN];
  24. } PERFOPTIMIZESTRINGMAP, *PPERFOPTIMIZESTRINGMAP;
  25. extern PERFOPTIMIZESTRINGMAP g_PerfOptimizeStringTable[];
  26. //
  27. // Number of optimization levels
  28. // these are
  29. // Modem (28.8 Kbps)
  30. // Modem (56kbps)
  31. // Broadband (128 Kbps - 1.5 Mbps)
  32. // LAN (10Mbps or higher)
  33. // Custom (Defined in Options / Performance)
  34. //
  35. // The number of perf strings in g_PerfOptimizeStringTable must correspond
  36. // to the number of optimzation levels
  37. //
  38. #define NUM_PERF_OPTIMIZATIONS 5
  39. #define CUSTOM_OPTIMIZATION_LEVEL (NUM_PERF_OPTIMIZATIONS-1)
  40. class CPropPerf
  41. {
  42. public:
  43. CPropPerf(HINSTANCE hInstance, CTscSettings* pTscSet, CSH* pSh);
  44. ~CPropPerf();
  45. static CPropPerf* CPropPerf::_pPropPerfInstance;
  46. static INT_PTR CALLBACK StaticPropPgPerfDialogProc (HWND hwndDlg,
  47. UINT uMsg,
  48. WPARAM wParam,
  49. LPARAM lParam);
  50. void SetTabDisplayArea(RECT& rc) {_rcTabDispayArea = rc;}
  51. static DWORD MapOptimizationLevelToPerfFlags(int optLevel);
  52. static INT MapPerfFlagsToOptLevel(DWORD dwDisableFeatureList);
  53. static VOID UpdateCustomDisabledList(DWORD dwDisableFeatureList);
  54. private:
  55. //Perf proppage
  56. INT_PTR CALLBACK PropPgPerfDialogProc (HWND hwndDlg,
  57. UINT uMsg,
  58. WPARAM wParam,
  59. LPARAM lParam);
  60. BOOL InitPerfCombo();
  61. VOID OnPerfComboSelChange();
  62. VOID OnCheckBoxStateChange(int checkBoxID);
  63. VOID SyncCheckBoxesToPerfFlags(DWORD dwDisableFeatureList);
  64. DWORD GetPerfFlagsFromCheckboxes();
  65. DWORD MergePerfFlags(DWORD dwCheckBoxFlags, DWORD dwOrig, DWORD dwMask);
  66. BOOL EnableCheckBoxes(BOOL fEnable);
  67. private:
  68. CTscSettings* _pTscSet;
  69. CSH* _pSh;
  70. RECT _rcTabDispayArea;
  71. HINSTANCE _hInstance;
  72. HWND _hwndDlg;
  73. BOOL _fSyncingCheckboxes;
  74. };
  75. #endif // _propperf_h_