文件名称:
clock_ctrl_src,clock_src
开发工具:
文件大小: 3mb
下载次数: 0
上传时间: 2010-10-16
详细说明: vc 时钟程序 class CClockCtrl : public CStatic { public: //Constructors / Destructors CClockCtrl(); //Accessors int GetHour() const { return m_nHour; }; int GetMinute() const { return m_nMinute; }; int GetSecond() const { return m_nSecond; }; BOOL GetRealTime() const; BOOL GetShowHours() const { return m_bShowHours; }; BOOL GetShowMinutes() const { return m_bShowMinutes; }; BOOL GetShowSeconds() const { return m_bShowSeconds; }; BOOL GetShowPoints() const { return m_bShowPoints; } ; BOOL GetShowMinorPoints() const { return m_bShowMinorPoints; }; COLORREF GetHourMinutesHandColor() const { return m_ColorHourMinutesHand; }; COLORREF GetBackgroundColor() const { return m_ColorBackground; }; BOOL Get3dPoints() const { return m_b3dPoints; }; //Mutators void SetTime(int nHour, int nMinute, int nSecond); void SetRealTime(BOOL bRealTime); void SetShowHours(BOOL bShowHours); void SetShowMinutes(BOOL bShowMinutes); void SetShowSeconds(BOOL bShowSeconds); void SetShowPoints(BOOL bShowPoints); void SetShowMinorPoints(BOOL bShowMinorPoints); void SetHourMinutesHandColor(COLORREF color); void SetBackgroundColor(COLORREF color); void Set3dPoints(BOOL b3dPoints); protected: enum HandType { HOUR, MINUTE, SECOND }; //{{AFX_VIRTUAL(CClockCtrl) virtual void PreSubclassWindow(); //}}AFX_VIRTUAL //{{AFX_MSG(CClockCtrl) afx_msg void OnPaint(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnDestroy(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); //}}AFX_MSG void RecalcLayout(); double MinuteToRadian(double minute); CPoint ComputePoint(int nMinute, double ratio); void DrawFacePoint(CDC& dc, const CPoint& point, BOOL bMajor); void DrawHands(CDC& dc, int nHour, int nMinute, int nSecond, BOOL bDrawAll); void DrawHand(CDC& dc, int nMinute, HandType type, BOOL bDraw); void GetHandPoints(int nValue, HandType type, CPoint* pPoints); //Member variables COLORREF m_ColorHourMinutesHand; COLORREF m_ColorPoints; COLORREF m_ColorBackground; CPoint m_MiddlePoint; int m_nXRadius; int m_nYRadius; int m_nPointWidth; int m_nHour; int m_nMinute; int m_nSecond; UINT m_nTimerID; BOOL m_bEnableRealtime; BOOL m_bShowHours; BOOL m_bShowMinutes; BOOL m_bShowSeconds; BOOL m_bShowPoints; BOOL m_bShowMinorPoints; BOOL m_b3dPoints; DECLARE_MESSAGE_MAP() }; ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.