-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathClock.h
48 lines (47 loc) · 981 Bytes
/
Clock.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include "Needle.h"
class CClock
{
public:
CClock(void);
~CClock(void);
//画表盘
void DrawCircle(CDC *pDC,POINT startPoint,POINT stopPoint);
//画普通点
void DrawPoint(CDC *pDC,POINT satrtPoint,POINT stopPoint);
//画关键刻度
void DrawKeyPoint(CDC *pDC,POINT satrtPoint,POINT stopPoint);
//创建画笔
void CreatePen(int vType,int vStyle,int vWidth,COLORREF vColor);
//画自己全部
void DrawSelf(CDC *pDC);
//设置圆心和半径
void SetCenterAndRadion(POINT vCenter,int vRadio);
//获得相应的坐标
POINT GetPoint(int len,int i);
//更新时间数据
void UpdateDate(int Hour,int Minute,int Secend);
private:
//表的半径
int m_Radio;
//表的中心位置
POINT m_Center;
//时针指针
CNeedle *m_HourNeedle;
//分针
CNeedle *m_MinuteNeedle;
//秒针
CNeedle *m_SecondNeedle;
/*int m_Hour;
int m_Minute;
int m_Second;*/
/*int m_Year;
int m_Month;
int m_Day;*/
//画圆盘的笔
CPen m_CirclePen;
//画关键点的笔
CPen m_KeyPointPen;
//画普通点的笔
CPen m_PointPen;
};