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.

105 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. deffs.h
  5. Abstract:
  6. Default Ftp Site Dialog
  7. Author:
  8. Sergei Antonov (sergeia)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef __DEFFS_H__
  14. #define __DEFFS_H__
  15. class CDefFtpSitePage : public CInetPropertyPage
  16. {
  17. DECLARE_DYNCREATE(CDefFtpSitePage)
  18. //
  19. // Construction
  20. //
  21. public:
  22. CDefFtpSitePage(CInetPropertySheet * pSheet = NULL);
  23. ~CDefFtpSitePage();
  24. //
  25. // Dialog Data
  26. //
  27. protected:
  28. //{{AFX_DATA(CDefWebSitePage)
  29. enum { IDD = IDD_FTP_DEFAULT_SITE };
  30. BOOL m_fLimitBandwidth;
  31. CButton m_LimitBandwidth;
  32. DWORD m_dwMaxBandwidthDisplay;
  33. CEdit m_MaxBandwidth;
  34. CSpinButtonCtrl m_MaxBandwidthSpin;
  35. //}}AFX_DATA
  36. DWORD m_dwMaxBandwidth;
  37. //
  38. // Overrides
  39. //
  40. protected:
  41. virtual HRESULT FetchLoadedValues();
  42. virtual HRESULT SaveInfo();
  43. static void
  44. ParseMaxNetworkUse(
  45. DWORD& dwMaxBandwidth,
  46. DWORD& dwMaxBandwidthDisplay,
  47. BOOL& fLimitBandwidth
  48. );
  49. static void
  50. BuildMaxNetworkUse(
  51. DWORD& dwMaxBandwidth,
  52. DWORD& dwMaxBandwidthDisplay,
  53. BOOL& fLimitBandwidth
  54. );
  55. // ClassWizard generate virtual function overrides
  56. //{{AFX_VIRTUAL(CDefWebSitePage)
  57. protected:
  58. virtual void DoDataExchange(CDataExchange * pDX);
  59. //}}AFX_VIRTUAL
  60. //
  61. // Implementation
  62. //
  63. protected:
  64. // Generated message map functions
  65. //{{AFX_MSG(CDefWebSitePage)
  66. virtual BOOL OnInitDialog();
  67. afx_msg void OnCheckLimitNetworkUse();
  68. afx_msg void OnItemChanged();
  69. //}}AFX_MSG
  70. DECLARE_MESSAGE_MAP()
  71. BOOL SetControlStates();
  72. private:
  73. };
  74. inline /* static */ void
  75. CDefFtpSitePage::BuildMaxNetworkUse(
  76. DWORD& dwMaxBandwidth,
  77. DWORD& dwMaxBandwidthDisplay,
  78. BOOL& fLimitBandwidth
  79. )
  80. {
  81. dwMaxBandwidth = fLimitBandwidth ?
  82. dwMaxBandwidthDisplay * KILOBYTE : INFINITE_BANDWIDTH;
  83. }
  84. #endif // __DEFFS_H__