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.

161 lines
5.2 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. #ifndef __AFXDTCTL_H__
  11. #define __AFXDTCTL_H__
  12. #ifndef __AFXWIN_H__
  13. #include <afxwin.h>
  14. #endif
  15. #ifndef __AFXDISP_H__
  16. #include <afxdisp.h>
  17. #endif
  18. /////////////////////////////////////////////////////////////////////////////
  19. #ifdef _AFX_PACKING
  20. #pragma pack(push, _AFX_PACKING)
  21. #endif
  22. //CObject
  23. class CImageList;
  24. //CCmdTarget;
  25. //CWnd
  26. // class CListBox;
  27. class CMonthCalCtrl;
  28. class CDateTimeCtrl;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CDateTimeCtrl
  31. class CDateTimeCtrl : public CWnd
  32. {
  33. DECLARE_DYNAMIC(CDateTimeCtrl)
  34. // Constructors
  35. CDateTimeCtrl();
  36. BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  37. // Attributes
  38. COLORREF GetMonthCalColor(int iColor) const;
  39. COLORREF SetMonthCalColor(int iColor, COLORREF ref);
  40. BOOL SetFormat(LPCTSTR pstrFormat);
  41. CMonthCalCtrl* GetMonthCalCtrl() const;
  42. CFont* GetMonthCalFont() const;
  43. void SetMonthCalFont(HFONT hFont, BOOL bRedraw = TRUE);
  44. BOOL SetRange(const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
  45. DWORD GetRange(COleDateTime* pMinRange, COleDateTime* pMaxRange) const;
  46. BOOL SetRange(const CTime* pMinRange, const CTime* pMaxRange);
  47. DWORD GetRange(CTime* pMinRange, CTime* pMaxRange) const;
  48. // Operations
  49. BOOL SetTime(const CTime* pTimeNew);
  50. DWORD GetTime(CTime& timeDest) const;
  51. BOOL SetTime(const COleDateTime& timeNew);
  52. BOOL GetTime(COleDateTime& timeDest) const;
  53. BOOL SetTime(LPSYSTEMTIME pTimeNew = NULL);
  54. DWORD GetTime(LPSYSTEMTIME pTimeDest) const;
  55. // Overridables
  56. virtual ~CDateTimeCtrl();
  57. };
  58. /////////////////////////////////////////////////////////////////////////////
  59. // CMonthCalCtrl
  60. class CMonthCalCtrl : public CWnd
  61. {
  62. DECLARE_DYNAMIC(CMonthCalCtrl)
  63. // Constructors
  64. CMonthCalCtrl();
  65. BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  66. BOOL Create(DWORD dwStyle, const POINT& pt, CWnd* pParentWnd, UINT nID);
  67. //Attributes
  68. BOOL GetMinReqRect(RECT* pRect) const;
  69. int SetMonthDelta(int iDelta);
  70. int GetMonthDelta() const;
  71. BOOL SetFirstDayOfWeek(int iDay, int* lpnOld = NULL);
  72. int GetFirstDayOfWeek(BOOL* pbLocal = NULL) const;
  73. COLORREF GetColor(int nRegion) const;
  74. COLORREF SetColor(int nRegion, COLORREF ref);
  75. DWORD HitTest(PMCHITTESTINFO pMCHitTest);
  76. // Operations
  77. BOOL SizeMinReq(BOOL bRepaint = TRUE);
  78. void SetToday(const COleDateTime& refDateTime);
  79. void SetToday(const CTime* pDateTime);
  80. void SetToday(const LPSYSTEMTIME pDateTime);
  81. BOOL GetToday(CTime& refTime) const;
  82. BOOL GetToday(COleDateTime& refDateTime) const;
  83. BOOL GetToday(LPSYSTEMTIME pDateTime) const;
  84. BOOL GetCurSel(LPSYSTEMTIME pDateTime) const;
  85. BOOL SetCurSel(const LPSYSTEMTIME pDateTime);
  86. BOOL SetCurSel(const CTime& refDateTime);
  87. BOOL GetCurSel(CTime& refDateTime) const;
  88. BOOL SetCurSel(const COleDateTime& refDateTime);
  89. BOOL GetCurSel(COleDateTime& refDateTime) const;
  90. BOOL SetDayState(int nMonths, LPMONTHDAYSTATE pStates);
  91. BOOL SetMaxSelCount(int nMax);
  92. int GetMaxSelCount() const;
  93. BOOL SetRange(const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
  94. DWORD GetRange(COleDateTime* pMinRange, COleDateTime* pMaxRange) const;
  95. BOOL SetRange(const CTime* pMinRange, const CTime* pMaxRange);
  96. DWORD GetRange(CTime* pMinRange, CTime* pMaxRange) const;
  97. BOOL SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);
  98. DWORD GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;
  99. int GetMonthRange(COleDateTime& refMinRange, COleDateTime& refMaxRange,
  100. DWORD dwFlags) const;
  101. int GetMonthRange(CTime& refMinRange, CTime& refMaxRange,
  102. DWORD dwFlags) const;
  103. int GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange,
  104. DWORD dwFlags) const;
  105. BOOL SetSelRange(const COleDateTime& pMinRange,
  106. const COleDateTime& pMaxRange);
  107. BOOL GetSelRange(COleDateTime& refMinRange,
  108. COleDateTime& refMaxRange) const;
  109. BOOL SetSelRange(const CTime& pMinRange, const CTime& pMaxRange);
  110. BOOL GetSelRange(CTime& refMinRange, CTime& refMaxRange) const;
  111. BOOL GetSelRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;
  112. BOOL SetSelRange(const LPSYSTEMTIME pMinRange,
  113. const LPSYSTEMTIME pMaxRange);
  114. // Overridables
  115. virtual ~CMonthCalCtrl();
  116. };
  117. /////////////////////////////////////////////////////////////////////////////
  118. // Inline function declarations
  119. #ifdef _AFX_PACKING
  120. #pragma pack(pop)
  121. #endif
  122. #ifdef _AFX_ENABLE_INLINES
  123. #define _AFXDTCTL_INLINE AFX_INLINE
  124. #include <afxdtctl.inl>
  125. #undef _AFXDTCTL_INLINE
  126. #endif
  127. #undef AFX_DATA
  128. #define AFX_DATA
  129. #ifdef _AFX_MINREBUILD
  130. #pragma component(minrebuild, on)
  131. #endif
  132. #ifndef _AFX_FULLTYPEINFO
  133. #pragma component(mintypeinfo, off)
  134. #endif
  135. #endif //__AFXDTCTL_H__
  136. /////////////////////////////////////////////////////////////////////////////