📄 coolclockdlg.h
字号:
// CoolClockDlg.h : header file
//
#if !defined(AFX_COOLCLOCKDLG_H__1D5BE982_A559_406D_9A46_844765D61180__INCLUDED_)
#define AFX_COOLCLOCKDLG_H__1D5BE982_A559_406D_9A46_844765D61180__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CCoolClockDlg dialog
//GDI COLOR DEFFINE
#define RgbBlack COLORREF(0x000000)
#define RgbDarkGray COLORREF(0x555555)
#define RgbDarkRed COLORREF(0x000080)
#define RgbDarkGreen COLORREF(0x008000)
#define RgbDarkYellow COLORREF(0x008080)
#define RgbDarkBlue COLORREF(0x800000)
#define RgbDarkMagenta COLORREF(0x800080)
#define RgbDarkCyan COLORREF(0x808000)
#define RgbRed COLORREF(0x0000ff)
#define RgbGreen COLORREF(0x00ff00)
#define RgbYellow COLORREF(0x00ffff)
#define RgbBlue COLORREF(0xff0000)
#define RgbMagenta COLORREF(0xff00ff)
#define RgbCyan COLORREF(0xffff00)
#define RgbGray COLORREF(0xaaaaaa)
#define RgbWhite COLORREF(0xffffff)
//
#define PI 3.1415926535
#define SECONDHOUR 43200
#define SECONDMINUTE 3600
#define SECONDSECOND 60
#define MAIN_RAD 78
#define HOUR_RAD 40
#define MINUTE_RAD 60
#define SECOND_RAD 70
#define TAIL_RAD 30
#define OFFSET 3
#define HAND_CIRCLEWIDTH 6
#define HOUR_CIRCLEWIDTH 8
#define MINUTE_CIRCLEWIDTH 4
class CCoolClockDlg : public CDialog
{
// Construction
public:
void MoveHand();
void InitRgn();
CCoolClockDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CCoolClockDlg)
enum { IDD = IDD_COOLCLOCK_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCoolClockDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
CRgn m_MainRgn;
CRgn m_HourPt;
CRgn m_MinutePt;
CRgn m_HourRgn;
CRgn m_MinuteRgn;
CRgn m_SecondRgn;
CBrush m_brMinutePoint;
CBrush m_brMinuteBody;
CBrush m_brHourPoint;
CBrush m_brHourBody;
CBrush m_brSecondBody;
COLORREF m_clrHourPoint;
COLORREF m_clrHourBody;
COLORREF m_clrMinute;
// Generated message map functions
//{{AFX_MSG(CCoolClockDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_COOLCLOCKDLG_H__1D5BE982_A559_406D_9A46_844765D61180__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -