📄 lifedlg.h
字号:
// lifeDlg.h : header file
//
#if !defined(AFX_LIFEDLG_H__7D229346_1A1D_11D6_B3D2_DEEBC6DD9C1B__INCLUDED_)
#define AFX_LIFEDLG_H__7D229346_1A1D_11D6_B3D2_DEEBC6DD9C1B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CLifeDlg dialog
class CLifeDlg : public CDialog
{
public:
int BioTop, BioBottom, BioRight, BioLeft;
double BioWidth,BioHeigh;
int pos;
bool isMusic;
//光标资源
HCURSOR hCursor1;
HCURSOR hCursor2;
CBitmap curtimeBMP;
CBitmap nextmonthBMP;
CBitmap premonthBMP;
CBitmap curtimeBMP2;
CBitmap nextmonthBMP2;
CBitmap premonthBMP2;
public:
//初始化窗体
void InitDialog();
//画曲线
void DrawLine (int x1,int y1,int x2,int y2,int DrawWidth,long rgb);
//画边框
void DrawBioBorder();
//画曲线
void DrawBioCurve(double Swing, int Cycle, double Position,long rgb);
//画生命曲线
void DrawLife();
//输出文本
void OutText(int x, int y, CString str, long textColor,long bkColor,CFont *font =NULL);
//画焦点
void DrawFocus(int pos);
//画矩形
void DrawRect(int x1, int y1,int x2,int y2, long penColor =NULL,long brushColor =NULL);
//画渐变颜色背景
void DrawGradient(CRect rectClient);
//计算时间差
int TimeSub();
//播放背景音乐
void OnMusic() ;
// Construction
public:
CLifeDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CLifeDlg)
enum { IDD = IDD_LIFE_DIALOG };
CStatic m_curDay;
CStatic m_nextMonth;
CStatic m_preMonth;
CDateTimeCtrl m_bornDateCtr;
CDateTimeCtrl m_curDateCtr;
CTime m_bornDate;
CTime m_curDate;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLifeDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CLifeDlg)
virtual void OnContextMenu(CWnd*, CPoint point);
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnCancel();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnBackdropMusic();
afx_msg void OnNextYear();
afx_msg void OnPreYear();
afx_msg void OnAbout();
afx_msg void OnPremonth();
afx_msg void OnNextmonth();
afx_msg void OnCurtime();
afx_msg void OnDatetimechangeCurDatetime(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDatetimechangeBornDatetime(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnAboutbox();
afx_msg void OnHelp();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LIFEDLG_H__7D229346_1A1D_11D6_B3D2_DEEBC6DD9C1B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -