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.

157 lines
4.7 KiB

  1. /*---------------------------------------------**
  2. ** Copyright (c) 1998 Microsoft Corporation **
  3. ** All Rights reserved **
  4. ** **
  5. ** tsreg.h **
  6. ** **
  7. ** Project definitions for TSREG. **
  8. ** 07-01-98 a-clindh Created **
  9. **---------------------------------------------*/
  10. // Defines
  11. #define SHADOWINDEX 0
  12. #define DEDICATEDINDEX 1
  13. #define CACHESIZEINDEX 2
  14. #define GLYPHCACHEBASE 3
  15. #define CACHEPROP1 13
  16. #define CACHEPROP2 14
  17. #define CACHEPROP3 15
  18. #define CACHEPROP4 16
  19. #define CACHEPROP5 17
  20. #define NUM_CACHE_INDEX 22
  21. #define TEXTFRAGINDEX 18
  22. #define GLYPHINDEX 19
  23. #define ORDERINDEX 20
  24. #define MAXTEXTFRAGSIZE 256
  25. #define NUMBER_OF_SLIDERS 10
  26. #define MIN_GLYPH_CACHE_SIZE 4
  27. #define MAX_GLYPH_CACHE_SIZE 512
  28. #define MAX_ORDER_DRAW_VAL 65535
  29. #define MIN_ORDER_DRAW_VAL 0
  30. #define MIN_BITMAP_CACHE_SIZE 150
  31. #define MAX_BITMAP_CACHE_SIZE 4500
  32. #define MAX_MESSAGE_LEN 100
  33. #define CACHE_LIST_STEP_VAL 500
  34. #define PERCENT_COMBO_COUNT 5
  35. #define NUM_SLIDER_STOPS 8
  36. #define NUM_CELL_CACHES_INDEX 21
  37. #define BM_PERSIST_BASE_INDEX 22
  38. #define FULL 2
  39. #define PARTIAL 1
  40. #define NONE 0
  41. #define PAGECOUNT 4
  42. #define MAXTEXTSIZE 1024
  43. //
  44. // constants for g_KeyInfo
  45. //
  46. #define KEYSTART 6 // constants for using string table
  47. #define KEYEND 32 // to load key names.
  48. #define KEYCOUNT 27 // total number of keys per profile
  49. #define MAXKEYSIZE 120
  50. // Foreground window lock timeout default value
  51. #define LOCK_TIMEOUT 200000
  52. //
  53. // un-comment if you want to use string table for key names
  54. //
  55. // #define USE_STRING_TABLE 1
  56. /////////////////////////// Quick MessageBox Macro ////////////////////////////
  57. #define DIMOF(Array) (sizeof(Array) / sizeof(Array[0]))
  58. #define MB(s) { \
  59. TCHAR szTMP[128]; \
  60. GetModuleFileName(NULL, szTMP, DIMOF(szTMP)); \
  61. MessageBox(GetActiveWindow(), s, szTMP, MB_OK); \
  62. }
  63. // Types
  64. typedef struct _KeyInfo
  65. {
  66. TCHAR Key[MAXKEYSIZE];
  67. DWORD DefaultKeyValue;
  68. DWORD CurrentKeyValue;
  69. TCHAR KeyPath[MAX_PATH];
  70. } KEY_INFO;
  71. typedef struct _ProfileKeyInfo
  72. {
  73. struct _ProfileKeyInfo *Next;
  74. KEY_INFO KeyInfo[KEYCOUNT];
  75. int Index;
  76. } PROFILE_KEY_INFO;
  77. // Externs
  78. extern KEY_INFO g_KeyInfo[KEYCOUNT];
  79. extern HINSTANCE g_hInst;
  80. extern TCHAR g_lpszPath[MAX_PATH];
  81. extern TCHAR g_lpszClientProfilePath[MAX_PATH];
  82. extern HWND g_hwndShadowBitmapDlg;
  83. extern HWND g_hwndGlyphCacheDlg;
  84. extern HWND g_hwndMiscDlg;
  85. extern HWND g_hwndProfilesDlg;
  86. extern PROFILE_KEY_INFO *g_pkfProfile;
  87. extern PROFILE_KEY_INFO *g_pkfStart;
  88. extern TCHAR lpszTimoutPath[MAX_PATH];
  89. extern TCHAR lpszTimeoutKey[MAX_PATH];
  90. // Prototypes
  91. INT_PTR CALLBACK ShadowBitmap(HWND, UINT, WPARAM, LPARAM);
  92. INT_PTR CALLBACK GlyphCache(HWND, UINT, WPARAM, LPARAM);
  93. INT_PTR CALLBACK Miscellaneous(HWND, UINT, WPARAM, LPARAM);
  94. INT_PTR CALLBACK ProfilePage(HWND, UINT, WPARAM, LPARAM);
  95. INT_PTR CALLBACK SaveDialog(HWND, UINT, WPARAM, LPARAM);
  96. INT_PTR CreatePropertySheet(HWND);
  97. void DeleteRegKey(int, TCHAR lpszRegPath[MAX_PATH]);
  98. void SetRegKey(int, TCHAR lpszRegPath[MAX_PATH]);
  99. void WriteBlankKey(TCHAR lpszRegPath[MAX_PATH]);
  100. int GetRegKey(int, TCHAR lpszRegPath[MAX_PATH]);
  101. void SaveSettings(HWND, int, int, int, TCHAR lpszRegPath[MAX_PATH]);
  102. void RestoreSettings(HWND, int, int, int, TCHAR lpszRegPath[MAX_PATH]);
  103. BOOL SaveBitmapSettings(TCHAR lpszRegPath[MAX_PATH]);
  104. int GetRegKeyValue(int);
  105. void InitMiscControls(HWND, HWND);
  106. int GetCellSize(int, int);
  107. void GetClientProfileNames(TCHAR lpszClientProfilePath[]);
  108. void SetControlValues();
  109. void LoadKeyValues();
  110. void ReadRecordIn(TCHAR lpszBuffer[]);
  111. void WriteRecordOut(TCHAR lpszBuffer[]);
  112. void ReloadKeys(TCHAR lpszBuffer[], HWND hwndProfilesCBO);
  113. void ResetTitle(TCHAR lpszBuffer[]);
  114. void SetEditCell(TCHAR lpszBuffer[],
  115. HWND hwndProfilesCBO);
  116. void DisplayControlValue(HWND hwndSlider[],
  117. HWND hwndSliderEditBuddy[], int i);
  118. int GetKeyVal(TCHAR lpszRegPath[MAX_PATH],
  119. TCHAR lpszKeyName[MAX_PATH]);
  120. void SetRegKeyVal(TCHAR lpszRegPath[MAX_PATH],
  121. TCHAR lpszKeyName[MAX_PATH],
  122. int nKeyValue);
  123. void EnableControls(HWND hDlg,
  124. HWND hwndSliderDistProp[],
  125. HWND hwndPropChkBox[],
  126. HWND hwndSliderDistBuddy[],
  127. HWND hwndEditNumCaches,
  128. HWND hwndSliderNumCaches,
  129. int nNumCellCaches,
  130. TCHAR lpszRegPath[]);
  131. // end of file
  132. ///////////////////////////////////////////////////////////////////////////////