DynamicClock.h
资源名称:Clock.rar [点击查看]
上传用户:fltzhang
上传日期:2021-02-05
资源大小:1886k
文件大小:2k
源码类别:
Static控件
开发平台:
Visual C++
- #if !defined(AFX_DYNAMICCLOCK_H__5BEC53E1_C68E_4E15_A835_A56A81E6800C__INCLUDED_)
- #define AFX_DYNAMICCLOCK_H__5BEC53E1_C68E_4E15_A835_A56A81E6800C__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // DynamicClock.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CDynamicClock window
- class CDynamicClock : public CStatic
- {
- // Construction
- public:
- CDynamicClock();
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDynamicClock)
- protected:
- virtual void PreSubclassWindow();
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void SetTimeFromat(CString timeFromat);
- void SetTextColor(COLORREF textColor);
- COLORREF GetTextColor();
- void SetFont(CFont *font);
- LOGFONT GetLogFont();
- virtual ~CDynamicClock();
- void UpdateTime();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CDynamicClock)
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- void AdaptFontRect();
- CString m_strTimeFormat;
- COLORREF m_colText;
- CFont m_Font;
- void GetCurrentTime();
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_DYNAMICCLOCK_H__5BEC53E1_C68E_4E15_A835_A56A81E6800C__INCLUDED_)