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.

128 lines
4.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997-2002.
  5. //
  6. // File: SchedBas.h
  7. //
  8. // Contents:
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_SCHEDBAS_H__701CFB39_AEF8_11D1_9864_00C04FB94F17__INCLUDED_)
  12. #define AFX_SCHEDBAS_H__701CFB39_AEF8_11D1_9864_00C04FB94F17__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. // SchedBas.h : header file
  17. //
  18. #include "stdafx.h"
  19. #include "resource.h"
  20. #include "schedmat.h"
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // Private functions
  23. void ReplaceFrameWithControl (CWnd *pWnd, UINT nFrameID, CWnd *pControl, BOOL bAssignFrameIDToControl);
  24. /////////////////////////////////////////////////////////////////////////////
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CLegendCell control
  27. class CLegendCell : public CStatic
  28. {
  29. public:
  30. CLegendCell()
  31. : m_pMatrix( NULL ),
  32. m_nPercentage (0)
  33. {}
  34. void Init(CWnd* pParent, UINT nCtrlID, CScheduleMatrix* pMatrix, UINT nPercentage);
  35. protected:
  36. CScheduleMatrix* m_pMatrix;
  37. UINT m_nPercentage;
  38. CSize m_rectSize;
  39. // Generated message map functions
  40. //{{AFX_MSG(CLegendCell)
  41. afx_msg void OnPaint();
  42. //}}AFX_MSG
  43. DECLARE_MESSAGE_MAP()
  44. };
  45. /////////////////////////////////////////////////////////////////////////////
  46. #define IDC_SCHEDULE_MATRIX 20 // Id of the schedule matrix (arbitrary chosen)
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CScheduleBaseDlg dialog
  49. #define BASEDLGMSG_GETIDD WM_APP+3
  50. class CScheduleBaseDlg : public CDialog
  51. {
  52. // Construction
  53. public:
  54. virtual int GetIDD () = 0;
  55. void SetFlags (DWORD dwFlags);
  56. void SetTitle (LPCTSTR pszTitle);
  57. CScheduleBaseDlg(UINT nIDTemplate, bool bAddDaylightBias, CWnd* pParent = NULL); // standard constructor
  58. // Dialog Data
  59. //{{AFX_DATA(CScheduleBaseDlg)
  60. // NOTE: the ClassWizard will add data members here
  61. //}}AFX_DATA
  62. // Overrides
  63. // ClassWizard generated virtual function overrides
  64. //{{AFX_VIRTUAL(CScheduleBaseDlg)
  65. public:
  66. virtual void OnFinalRelease();
  67. protected:
  68. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  69. //}}AFX_VIRTUAL
  70. // Implementation
  71. protected:
  72. afx_msg LRESULT OnGetIDD (WPARAM wParam, LPARAM lParam);
  73. DWORD GetFlags () const;
  74. virtual void TimeChange () = 0;
  75. bool m_bSystemTimeChanged;
  76. virtual UINT GetExpectedArrayLength ()=0;
  77. virtual BYTE GetMatrixPercentage (UINT nHour, UINT nDay) = 0;
  78. void GetByteArray(OUT BYTE rgbData[], const size_t cbArray);
  79. void InitMatrix2 (const BYTE rgbData[]);
  80. virtual UINT GetPercentageToSet (const BYTE bData) = 0;
  81. virtual void UpdateButtons () = 0;
  82. virtual void InitMatrix () = 0;
  83. virtual void UpdateUI ();
  84. enum { c_crBlendColor = RGB(0, 0, 255) }; // Blending color of the schedule matrix
  85. CScheduleMatrix m_schedulematrix;
  86. const bool m_bAddDaylightBias;
  87. int m_nFirstDayOfWeek;
  88. size_t m_cbArray;
  89. // Generated message map functions
  90. //{{AFX_MSG(CScheduleBaseDlg)
  91. virtual BOOL OnInitDialog();
  92. virtual void OnOK();
  93. //}}AFX_MSG
  94. afx_msg void OnSelChange();
  95. afx_msg void OnTimeChange();
  96. DECLARE_MESSAGE_MAP()
  97. // Generated OLE dispatch map functions
  98. //{{AFX_DISPATCH(CScheduleBaseDlg)
  99. // NOTE - the ClassWizard will add and remove member functions here.
  100. //}}AFX_DISPATCH
  101. DECLARE_DISPATCH_MAP()
  102. DECLARE_INTERFACE_MAP()
  103. private:
  104. DWORD m_dwFlags;
  105. CString m_szTitle; // dialog title
  106. };
  107. //{{AFX_INSERT_LOCATION}}
  108. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  109. #endif // !defined(AFX_SCHEDBAS_H__701CFB39_AEF8_11D1_9864_00C04FB94F17__INCLUDED_)