UICheckBox.cpp 554 B

12345678910111213141516171819202122232425262728293031
  1. #include "stdafx.h"
  2. #include "UICheckBox.h"
  3. namespace DuiLib
  4. {
  5. LPCTSTR CCheckBoxUI::GetClass() const
  6. {
  7. return _T("CheckBoxUI");
  8. }
  9. LPVOID CCheckBoxUI::GetInterface(LPCTSTR pstrName)
  10. {
  11. if( _tcscmp(pstrName, DUI_CTR_CHECKBOX) == 0 ) return static_cast<CCheckBoxUI*>(this);
  12. return COptionUI::GetInterface(pstrName);
  13. }
  14. void CCheckBoxUI::SetCheck(bool bCheck, bool bTriggerEvent)
  15. {
  16. //if (GetCheck()==bCheck)
  17. //{
  18. // return;
  19. //}
  20. Selected(bCheck, bTriggerEvent);
  21. }
  22. bool CCheckBoxUI::GetCheck() const
  23. {
  24. return IsSelected();
  25. }
  26. }