123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #ifndef __UIDATETIME_H__
- #define __UIDATETIME_H__
- #pragma once
- namespace DuiLib
- {
- class CDateTimeWnd;
- /// ĘąźäŃĄÔńżŘźţ
- class UILIB_API CDateTimeUI : public CLabelUI
- {
- DECLARE_DUICONTROL(CDateTimeUI)
- friend class CDateTimeWnd;
- public:
- CDateTimeUI();
- LPCTSTR GetClass() const;
- LPVOID GetInterface(LPCTSTR pstrName);
- SYSTEMTIME& GetTime();
- void SetTime(SYSTEMTIME* pst);
- void SetReadOny(bool bReadOnly);
- bool IsReadOnly() const;
- void SetTimeFormat(LPCTSTR pstrFormat = _T("yyyy-MM-dd HH:mm:ss"));
- CDuiString GetTimeFormat() const;
- void UpdateText();
- void DoEvent(TEventUI& event);
- void SetPos(RECT rc, bool bNeedInvalidate = true);
- void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
- protected:
- SYSTEMTIME m_sysTime;
- int m_nDTUpdateFlag;
- bool m_bReadOnly;
- CDuiString m_sTimeFormat;
- CDateTimeWnd* m_pWindow;
- };
- }
- #endif // __UIDATETIME_H__
|