?? calendarfrm.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;
CBitmap m_oBitmaplist[12];
// 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 + -