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.

101 lines
3.5 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998, 1999, 2000
  4. *
  5. * TITLE: SSDATA.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 1/13/1999
  12. *
  13. * DESCRIPTION: Encapsulates reading and writing setting for this screensaver
  14. * from the registry
  15. *
  16. *******************************************************************************/
  17. #ifndef __SSDATA_H_INCLUDED
  18. #define __SSDATA_H_INCLUDED
  19. #include <windows.h>
  20. #include "simstr.h"
  21. class CMyDocsScreenSaverData
  22. {
  23. private:
  24. HKEY m_hKeyRoot;
  25. CSimpleString m_strRegistryKeyName;
  26. CSimpleString m_strImageDirectory;
  27. UINT m_nPaintTimerInterval;
  28. UINT m_nChangeTimerInterval;
  29. bool m_bDisplayFilename;
  30. int m_nMaxScreenPercent;
  31. bool m_bDisableTransitions;
  32. bool m_bAllowStretching;
  33. bool m_bAllowKeyboardControl;
  34. int m_nMaxFailedFiles;
  35. int m_nMaxSuccessfulFiles;
  36. int m_nMaxDirectories;
  37. LPCTSTR m_pszImageDirectoryValue;
  38. LPCTSTR m_pszPaintIntervalValue;
  39. LPCTSTR m_pszChangeIntervalValue;
  40. LPCTSTR m_pszDisplayFilename;
  41. LPCTSTR m_pszMaxScreenPercent;
  42. LPCTSTR m_pszDisableTransitions;
  43. LPCTSTR m_pszAllowStretching;
  44. LPCTSTR m_pszAllowKeyboardControl;
  45. LPCTSTR m_pszMaxFailedFiles;
  46. LPCTSTR m_pszMaxSuccessfulFiles;
  47. LPCTSTR m_pszMaxDirectories;
  48. enum
  49. {
  50. nDefaultChangeInterval = 6000,
  51. nDefaultPaintInterval = 0,
  52. bDefaultDisplayFilename = 0,
  53. nDefaultScreenPercent = 90,
  54. bDefaultDisableTransitions = 0,
  55. bDefaultAllowStretching = 0,
  56. bDefaultAllowKeyboardControl = 1,
  57. nDefaultMaxFailedFiles = 1000,
  58. nDefaultMaxSuccessfulFiles = 65536,
  59. nDefaultMaxDirectories = 200
  60. };
  61. // No implementation
  62. CMyDocsScreenSaverData(void);
  63. CMyDocsScreenSaverData &operator=( const CMyDocsScreenSaverData & );
  64. CMyDocsScreenSaverData( const CMyDocsScreenSaverData & );
  65. public:
  66. CMyDocsScreenSaverData( HKEY hKeyRoot, const CSimpleString &strRegistryKeyName );
  67. ~CMyDocsScreenSaverData(void);
  68. void Read(void);
  69. void Write(void);
  70. CSimpleString ImageDirectory(void) const;
  71. void ImageDirectory( const CSimpleString &str );
  72. UINT ChangeInterval(void) const;
  73. void ChangeInterval( UINT nInterval );
  74. UINT PaintInterval(void) const;
  75. void PaintInterval( UINT nInterval );
  76. bool DisplayFilename(void) const;
  77. void DisplayFilename( bool bDisplayFilename );
  78. int MaxScreenPercent(void) const;
  79. void MaxScreenPercent( int nMaxScreenPercent );
  80. bool DisableTransitions(void) const;
  81. void DisableTransitions( bool bDisableTransitions );
  82. bool AllowStretching(void) const;
  83. void AllowStretching( bool bAllowStretching );
  84. bool AllowKeyboardControl(void) const;
  85. void AllowKeyboardControl( bool bAllowKeyboardControl );
  86. int MaxFailedFiles(void) const;
  87. void MaxFailedFiles( int nMaxFailedFiles );
  88. int MaxSuccessfulFiles(void) const;
  89. void MaxSuccessfulFiles( int nMaxSuccessfulFiles );
  90. int MaxDirectories(void) const;
  91. void MaxDirectories( int nMaxDirectories );
  92. CSimpleString GetDefaultImageDir(void);
  93. };
  94. #endif // __SSDATA_H_INCLUDED