UIDateTime.h 897 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __UIDATETIME_H__
  2. #define __UIDATETIME_H__
  3. #pragma once
  4. namespace DuiLib
  5. {
  6. class CDateTimeWnd;
  7. /// ĘąźäŃĄÔńżŘźţ
  8. class UILIB_API CDateTimeUI : public CLabelUI
  9. {
  10. DECLARE_DUICONTROL(CDateTimeUI)
  11. friend class CDateTimeWnd;
  12. public:
  13. CDateTimeUI();
  14. LPCTSTR GetClass() const;
  15. LPVOID GetInterface(LPCTSTR pstrName);
  16. SYSTEMTIME& GetTime();
  17. void SetTime(SYSTEMTIME* pst);
  18. void SetReadOny(bool bReadOnly);
  19. bool IsReadOnly() const;
  20. void SetTimeFormat(LPCTSTR pstrFormat = _T("yyyy-MM-dd HH:mm:ss"));
  21. CDuiString GetTimeFormat() const;
  22. void UpdateText();
  23. void DoEvent(TEventUI& event);
  24. void SetPos(RECT rc, bool bNeedInvalidate = true);
  25. void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
  26. protected:
  27. SYSTEMTIME m_sysTime;
  28. int m_nDTUpdateFlag;
  29. bool m_bReadOnly;
  30. CDuiString m_sTimeFormat;
  31. CDateTimeWnd* m_pWindow;
  32. };
  33. }
  34. #endif // __UIDATETIME_H__