home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / include / afxdtctl.h < prev    next >
C/C++ Source or Header  |  1998-06-16  |  5KB  |  162 lines

  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.  
  11. #ifndef __AFXDTCTL_H__
  12. #define __AFXDTCTL_H__
  13.  
  14. #ifndef __AFXWIN_H__
  15.     #include <afxwin.h>
  16. #endif
  17.  
  18. #ifndef __AFXDISP_H__
  19.     #include <afxdisp.h>
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23.  
  24. #ifdef _AFX_PACKING
  25. #pragma pack(push, _AFX_PACKING)
  26. #endif
  27.  
  28. //CObject
  29.     class CImageList;
  30.     //CCmdTarget;
  31.         //CWnd
  32.             // class CListBox;
  33.             class CMonthCalCtrl;
  34.             class CDateTimeCtrl;
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CDateTimeCtrl
  38.  
  39. class CDateTimeCtrl : public CWnd
  40. {
  41.     DECLARE_DYNAMIC(CDateTimeCtrl)
  42.  
  43. // Constructors
  44.     CDateTimeCtrl();
  45.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  46.  
  47. // Attributes
  48.     COLORREF GetMonthCalColor(int iColor) const;
  49.     COLORREF SetMonthCalColor(int iColor, COLORREF ref);
  50.     BOOL SetFormat(LPCTSTR pstrFormat);
  51.     CMonthCalCtrl* GetMonthCalCtrl() const;
  52.     CFont* GetMonthCalFont() const;
  53.     void SetMonthCalFont(HFONT hFont, BOOL bRedraw = TRUE);
  54.     BOOL SetRange(const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
  55.     DWORD GetRange(COleDateTime* pMinRange, COleDateTime* pMaxRange) const;
  56.     BOOL SetRange(const CTime* pMinRange, const CTime* pMaxRange);
  57.     DWORD GetRange(CTime* pMinRange, CTime* pMaxRange) const;
  58.  
  59. // Operations
  60.     BOOL SetTime(const CTime* pTimeNew);
  61.     DWORD GetTime(CTime& timeDest) const;
  62.     BOOL SetTime(const COleDateTime& timeNew);
  63.     BOOL GetTime(COleDateTime& timeDest) const;
  64.     BOOL SetTime(LPSYSTEMTIME pTimeNew = NULL);
  65.     DWORD GetTime(LPSYSTEMTIME pTimeDest) const;
  66.  
  67. // Overridables
  68.     virtual ~CDateTimeCtrl();
  69. };
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CMonthCalCtrl
  73.  
  74. class CMonthCalCtrl : public CWnd
  75. {
  76.     DECLARE_DYNAMIC(CMonthCalCtrl)
  77.  
  78. // Constructors
  79.     CMonthCalCtrl();
  80.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  81.     BOOL Create(DWORD dwStyle, const POINT& pt, CWnd* pParentWnd, UINT nID);
  82.  
  83. //Attributes
  84.     BOOL GetMinReqRect(RECT* pRect) const;
  85.     int SetMonthDelta(int iDelta);
  86.     int GetMonthDelta() const;
  87.     BOOL SetFirstDayOfWeek(int iDay, int* lpnOld = NULL);
  88.     int GetFirstDayOfWeek(BOOL* pbLocal = NULL) const;
  89.     COLORREF GetColor(int nRegion) const;
  90.     COLORREF SetColor(int nRegion, COLORREF ref);
  91.     DWORD HitTest(PMCHITTESTINFO pMCHitTest);
  92.  
  93. // Operations
  94.     BOOL SizeMinReq(BOOL bRepaint = TRUE);
  95.     void SetToday(const COleDateTime& refDateTime);
  96.     void SetToday(const CTime* pDateTime);
  97.     void SetToday(const LPSYSTEMTIME pDateTime);
  98.     BOOL GetToday(CTime& refTime) const;
  99.     BOOL GetToday(COleDateTime& refDateTime) const;
  100.     BOOL GetToday(LPSYSTEMTIME pDateTime) const;
  101.     BOOL GetCurSel(LPSYSTEMTIME pDateTime) const;
  102.     BOOL SetCurSel(const LPSYSTEMTIME pDateTime);
  103.     BOOL SetCurSel(const CTime& refDateTime);
  104.     BOOL GetCurSel(CTime& refDateTime) const;
  105.     BOOL SetCurSel(const COleDateTime& refDateTime);
  106.     BOOL GetCurSel(COleDateTime& refDateTime) const;
  107.     BOOL SetDayState(int nMonths, LPMONTHDAYSTATE pStates);
  108.     BOOL SetMaxSelCount(int nMax);
  109.     int GetMaxSelCount() const;
  110.     BOOL SetRange(const COleDateTime* pMinRange, const COleDateTime* pMaxRange);
  111.     DWORD GetRange(COleDateTime* pMinRange, COleDateTime* pMaxRange) const;
  112.     BOOL SetRange(const CTime* pMinRange, const CTime* pMaxRange);
  113.     DWORD GetRange(CTime* pMinRange, CTime* pMaxRange) const;
  114.     BOOL SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);
  115.     DWORD GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;
  116.     int GetMonthRange(COleDateTime& refMinRange, COleDateTime& refMaxRange,
  117.         DWORD dwFlags) const;
  118.     int GetMonthRange(CTime& refMinRange, CTime& refMaxRange,
  119.         DWORD dwFlags) const;
  120.     int GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange,
  121.         DWORD dwFlags) const;
  122.     BOOL SetSelRange(const COleDateTime& pMinRange,
  123.         const COleDateTime& pMaxRange);
  124.     BOOL GetSelRange(COleDateTime& refMinRange,
  125.         COleDateTime& refMaxRange) const;
  126.     BOOL SetSelRange(const CTime& pMinRange, const CTime& pMaxRange);
  127.     BOOL GetSelRange(CTime& refMinRange, CTime& refMaxRange) const;
  128.     BOOL GetSelRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;
  129.     BOOL SetSelRange(const LPSYSTEMTIME pMinRange,
  130.         const LPSYSTEMTIME pMaxRange);
  131.  
  132. // Overridables
  133.     virtual ~CMonthCalCtrl();
  134. };
  135.  
  136. /////////////////////////////////////////////////////////////////////////////
  137. // Inline function declarations
  138.  
  139. #ifdef _AFX_PACKING
  140. #pragma pack(pop)
  141. #endif
  142.  
  143. #ifdef _AFX_ENABLE_INLINES
  144. #define _AFXDTCTL_INLINE AFX_INLINE
  145. #include <afxdtctl.inl>
  146. #undef _AFXDTCTL_INLINE
  147. #endif
  148.  
  149. #undef AFX_DATA
  150. #define AFX_DATA
  151.  
  152. #ifdef _AFX_MINREBUILD
  153. #pragma component(minrebuild, on)
  154. #endif
  155. #ifndef _AFX_FULLTYPEINFO
  156. #pragma component(mintypeinfo, off)
  157. #endif
  158.  
  159. #endif //__AFXDTCTL_H__
  160.  
  161. /////////////////////////////////////////////////////////////////////////////
  162.