UIDateTime.h 818 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __UIDATETIME_H__
  2. #define __UIDATETIME_H__
  3. #pragma once
  4. namespace DuiLib
  5. {
  6. class CDateTimeWnd;
  7. /// ʱ¼äÑ¡Ôñ¿Ø¼þ
  8. class DUILIB_API CDateTimeUI : public CLabelUI
  9. {
  10. friend class CDateTimeWnd;
  11. public:
  12. CDateTimeUI();
  13. LPCTSTR GetClass() const;
  14. LPVOID GetInterface(LPCTSTR pstrName);
  15. UINT GetControlFlags() const;
  16. HWND GetNativeWindow() const;
  17. SYSTEMTIME& GetTime();
  18. void SetTime(SYSTEMTIME* pst);
  19. void SetReadOnly(bool bReadOnly);
  20. bool IsReadOnly() const;
  21. void UpdateText();
  22. void SetPos(RECT rc, bool bNeedInvalidate = true);
  23. void Move(SIZE szOffset, bool bNeedInvalidate = true);
  24. void DoEvent(TEventUI& event);
  25. protected:
  26. SYSTEMTIME m_sysTime;
  27. int m_nDTUpdateFlag;
  28. bool m_bReadOnly;
  29. CDateTimeWnd* m_pWindow;
  30. };
  31. }
  32. #endif // __UIDATETIME_H__