UIDateTime.h 759 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. 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 DoEvent(TEventUI& event);
  23. void SetFormat (LPCTSTR fmt);
  24. protected:
  25. SYSTEMTIME m_sysTime;
  26. int m_nDTUpdateFlag;
  27. bool m_bReadOnly;
  28. DuiLib::CDuiString m_format;
  29. CDateTimeWnd* m_pWindow;
  30. };
  31. }
  32. #endif // __UIDATETIME_H__