⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendarfrm.h

📁 it is china lunar tool
💻 H
字号:
/***************************************************************************
   致看到这些源代码的兄弟:
       你好!
       这本来是我为一个商业PDA产品开发的日历程序,最近移植于PC机上, 所以算法
   和数据部分是用纯C++写的,不涉及MFC,所有的代码都是以短节省存储空间为主要目
   的.
	   很高兴你对这些代码有兴趣,你可以随意复制和使用些代码,唯一有一点小小的
   愿望:在你使用和复制给别人时,别忘注明这些代码作者:-)。程序代码也就罢了,后
   面的数据可是我辛辛苦苦从万年历上找出来输进去的。
	   如果你有什么好的意见不妨Mail给我。

       wangfei@hanwang.com.cn
	   wangfei@engineer.com.cn
                                                                 2000年3月
****************************************************************************/
#if !defined(AFX_CALENDARFRM_H__9EC203BC_1574_4986_B73C_A44C975739CC__INCLUDED_)
#define AFX_CALENDARFRM_H__9EC203BC_1574_4986_B73C_A44C975739CC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Calendar1.h"
// CalendarFrm.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CCalendarFrm window
/////////////////////////////////////////////////////////////////////////////
// CYearEdit window

class CYearEdit : public CEdit
{
// Construction
public:
	CYearEdit();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CYearEdit)
	public:
	virtual BOOL Create(const RECT& rect, CWnd* pParentWnd, UINT nID);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CYearEdit();

	// Generated message map functions
protected:
	//{{AFX_MSG(CYearEdit)
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

class CCalendarFrm : public CWnd
{
private:
	CCalendar        m_oCalendar;
	CSpinButtonCtrl  m_oYearSelect;
	CComboBox        m_oMonthSelect;
	CYearEdit        m_oYearEdit;
	CButton          m_obutToday;
	CFont            m_oDispFont;
// Construction
public:
	CCalendarFrm();

// Attributes
public:
   void SetDate(WORD iYear, WORD iMonth, WORD iDay)
   {
	   m_oCalendar.SetDate(iYear, iMonth, iDay);
   }
   void GetDate(WORD &iYear, WORD &iMonth, WORD &iDay)
   {
	   m_oCalendar.GetDate(iYear, iMonth, iDay);
   }
   
   CFont * GetDispFont(){return &m_oDispFont;}
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCalendarFrm)
	public:
	virtual BOOL Create(RECT &rect, CWnd * pParentWnd, UINT nID);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CCalendarFrm();

	// Generated message map functions
private:
	void l_PaintToday(CPaintDC &dc);
	void l_PaintBorder(CPaintDC &dc);
	void l_PaintChineseInfo(CPaintDC &dc);
	void l_CreateDispFont();

protected:
	//{{AFX_MSG(CCalendarFrm)
	afx_msg void OnPaint();
	afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG
	afx_msg void OnSelChange(LONG iYearMonth, LONG iDay);
	afx_msg void OnMonthChange();
	afx_msg void OnYearChange();
	afx_msg void OnTodayClick();

	DECLARE_MESSAGE_MAP()
};



/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CALENDARFRM_H__9EC203BC_1574_4986_B73C_A44C975739CC__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -