📄 calendarpage.h
字号:
#if !defined(AFX_CALENDARPAGE_H__030A2ECD_02E0_4CDB_BAEE_7188B5AE333E__INCLUDED_)
#define AFX_CALENDARPAGE_H__030A2ECD_02E0_4CDB_BAEE_7188B5AE333E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CalendarPage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CCalendarPage dialog
#include "ColorStatic.h"
class CCalendarPage : public CDialog
{
// Construction
public:
//CString GetLunarDate2(int iYear,int iMonth,int iDay);
CCalendarPage(CWnd* pParent = NULL); // standard constructor
//根据阳历获取阴历年、月、日
CString GetLunarDate(unsigned int iYear,unsigned int iMonth,unsigned int iDay);
// Dialog Data
//{{AFX_DATA(CCalendarPage)
enum { IDD = IDD_DLG_CALENDER };
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCalendarPage)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CCalendarPage)
virtual BOOL OnInitDialog();
afx_msg void OnBtnOk();
afx_msg void OnSeleDateChange(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBtnNo();
afx_msg void OnBtnToday();
afx_msg void OnPaint();
afx_msg void OnSelectMonthcaldate(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CMonthCalCtrl m_MonthctrlDate;
CColorStatic m_sticLunar;
CString strLunarTime;
int SetPosAddSize(void); // 设置控件的位置和大小
int GetLunarDate(void); // 取得阳历年月日对应的阴历年月日
int SetLunarStaticInfo(int iFlag); // 设置静态文本显示的内容
int GetFirstSolarTerm(); // 获得没有每月的第一个节气对应的日子
int GetSecondSolarTerm(); // 获得没有每月的第二个节气对应的日子
// 计算选中年的间隔月的天数
void GetSelYearDay(int uiCalendarSolarMonth, unsigned int& itotaldays);
//设置月历控件选择当天值
void SetSelToday();
//记录用户选择的年、月、日
int m_iYear;
int m_iMonth;
int m_iDay;
/******************************************************************************
* 变量定义
******************************************************************************/
// 用户选择的阳历年、月、日,如果用户没有选择就默认是今天
unsigned int uiCalendarSolarYear;
unsigned int uiCalendarSolarMonth;
unsigned int uiCalendarSolarDay;
// 与阳历日期对应的阴历日期的年、月、日
unsigned int uiCalendarLunarYear;
unsigned int uiCalendarLunarMonth;
unsigned int uiCalendarLunarDay;
unsigned int gc_lunar_leap_month;
unsigned int start_day_of_week;
unsigned int temp_total_day;
int ileapmonthflag;// = 0; // 用来存储阳历对应阴历的闰月月份,如果对应的不是闰月则为0
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CALENDARPAGE_H__030A2ECD_02E0_4CDB_BAEE_7188B5AE333E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -