UIIPAddressEx.h 908 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __UIIPADDRESSEX_H__
  2. #define __UIIPADDRESSEX_H__
  3. #pragma once
  4. //给该控件添加一个属性dtstyle
  5. namespace DuiLib
  6. {
  7. /// IP输入控件
  8. class UILIB_API CIPAddressExUI : public CEditUI
  9. {
  10. DECLARE_DUICONTROL(CIPAddressExUI)
  11. public:
  12. CIPAddressExUI();
  13. LPCTSTR GetClass() const;
  14. LPVOID GetInterface(LPCTSTR pstrName);
  15. UINT GetControlFlags() const;
  16. void DoEvent(TEventUI& event);
  17. void PaintText(HDC hDC);
  18. void SetIP(LPCTSTR lpIP);
  19. CDuiString GetIP();
  20. private:
  21. void CharToInt();
  22. void GetNumInput(TCHAR chKey);
  23. void UpdateText();
  24. void IncNum();
  25. void DecNum();
  26. protected:
  27. int m_nFirst;
  28. int m_nSecond;
  29. int m_nThird;
  30. int m_nFourth;
  31. int m_nActiveSection;
  32. TCHAR m_chNum;
  33. CDuiString m_strNum;
  34. };
  35. }
  36. #endif // __UIIPADDRESSEX_H__